Part Number Hot Search : 
CR161003 P2005 FRA1602G LO331 CTS02M SAC50 JANTX2N VTD210L
Product Description
Full Text Search
 

To Download SA1110 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  intel ? strongarm * sa-1110 microprocessor developer ? s manual june 2000 order number: 278240-003 notice: this document contains information on products in the design phase of development. do not finalize a design with this information. revised information will be published when the product is available. verify with your local intel sales office that you have the latest technical information before finalizing a design.
sa-1110 developer?s manual information in this document is provided in connection with intel products. no license, express or implied, by estoppel or othe rwise, to any intellectual property rights is granted by this document. except as provided in intel?s terms and conditions of sale for such products, inte l assumes no liability whatsoever, and intel disclaims any express or implied warranty, relating to sale and/or use of intel products including liabil ity or warranties relating to fitness for a particular purpose, merchantability, or infringement of any patent, copyright or other intellectual property righ t. intel products are not intended for use in medical, life saving, or life sustaining applications. intel may make changes to specifications and product descriptions at any time, without notice. this document is an intermediate draft for comment only and is subject to change without notice. readers should not design prod ucts based on this document. designers must not rely on the absence or characteristics of any features or instructions marked "reserved" or "undefined." int el reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them. the sa-1110 may contain design defects or errors known as errata which may cause the product to deviate from published specifi cations. current characterized errata are available on request. contact your local intel sales office or your distributor to obtain the latest specifications and before placing your product o rder. copies of documents which have an ordering number and are referenced in this document, or other intel literature may be obtaine d by calling 1-800-548-4725 or by visiting intel?s website at http://www.intel.com. copyright ? intel corporation, 2000 *other brands and names are the property of their respective owners.
sa-1110 developer ? s manual iii contents 1 introduction .................................................................................................................. 1 ? 1 1.1 intel ? strongarm sa-1110 microprocessor.....................................................1 ? 1 1.2 overview ...........................................................................................................1 ? 4 1.3 example system ...............................................................................................1 ? 5 1.4 arm architecture ..............................................................................................1 ? 6 1.4.1 26-bit mode ...................................................................................................1 ? 6 1.4.2 coprocessors.................................................................................................1 ? 6 1.4.3 memory management....................................................................................1 ? 6 1.4.4 instruction cache...........................................................................................1 ? 6 1.4.5 data cache....................................................................................................1 ? 6 1.4.6 write buffer....................................................................................................1 ? 7 1.4.7 read buffer....................................................................................................1 ? 7 2 functional description ................................................................................................2 ? 1 2.1 block diagram ...................................................................................................2 ? 1 2.2 inputs/outputs ...................................................................................................2 ? 3 2.3 signal description .............................................................................................2 ? 4 2.4 memory map .....................................................................................................2 ? 8 3 arm implementation options .....................................................................................3 ? 1 3.1 big and little endian .........................................................................................3 ? 1 3.2 exceptions.........................................................................................................3 ? 1 3.2.1 power-up reset ............................................................................................3 ? 2 3.2.2 rom size select ...........................................................................................3 ? 2 3.2.3 abort ..............................................................................................................3 ? 3 3.2.4 vector summary ............................................................................................3 ? 4 3.2.5 exception priorities ........................................................................................3 ? 4 3.2.6 interrupt latencies and enable timing ..........................................................3 ? 5 3.3 coprocessors ....................................................................................................3 ? 5 4 instruction set ..............................................................................................................4 ? 1 4.1 instruction set ...................................................................................................4 ? 1 4.2 instruction timing ..............................................................................................4 ? 1 5 coprocessors ...............................................................................................................5 ? 1 5.1 internal coprocessor instructions......................................................................5 ? 1 5.2 coprocessor 15 definition .................................................................................5 ? 2 5.2.1 register 0 ? id...............................................................................................5 ? 2 5.2.2 register 1 ? control.......................................................................................5 ? 3 5.2.3 register 2 ? translation table base .............................................................5 ? 4 5.2.4 register 3 ? domain access control.............................................................5 ? 4 5.2.5 register 4 ? reserved...............................................................................5 ? 5 5.2.6 register 5 ? fault status ...............................................................................5 ? 5 5.2.7 register 6 ? fault address ............................................................................5 ? 5 5.2.8 register 7 ? cache control operations.........................................................5 ? 5 5.2.9 register 8 ? tlb operations .........................................................................5 ? 6 5.2.10 register 9 ? read-buffer operations ............................................................5 ? 6
iv sa-1110 developer ? s manual 5.2.11 registers 10 ? 12 reserved...................................................................... 5 ? 7 5.2.12 register 13 ? process id virtual address mapping ...................................... 5 ? 7 5.2.13 register 14 ? debug support (breakpoints).................................................. 5 ? 7 5.2.14 register 15 ? test, clock, and idle control ................................................... 5 ? 9 6 caches, write buffer, and read buffer ...................................................................... 6 ? 1 6.1 instruction cache (icache) ................................................................................ 6 ? 1 6.1.1 icache operation ........................................................................................... 6 ? 1 6.1.2 icache validity ............................................................................................... 6 ? 1 6.1.2.1 software icache flush ............................................................................. 6 ? 1 6.1.3 icache enable/disable and reset ................................................................. 6 ? 2 6.1.3.1 enabling the icache ................................................................................. 6 ? 2 6.1.3.2 disabling the icache ................................................................................ 6 ? 2 6.2 data caches (dcaches) .................................................................................... 6 ? 2 6.2.1 cacheable bit ? c.......................................................................................... 6 ? 3 6.2.1.1 cacheable reads ? c = 1 ....................................................................... 6 ? 3 6.2.1.2 noncacheable reads ? c = 0 ................................................................. 6 ? 3 6.2.2 bufferable bit ? b........................................................................................... 6 ? 3 6.2.3 software dcache flush ................................................................................. 6 ? 4 6.2.3.1 doubly mapped space ............................................................................ 6 ? 4 6.2.4 dcaches enable/disable and reset .............................................................. 6 ? 4 6.2.4.1 enabling the dcaches.............................................................................. 6 ? 5 6.2.4.2 disabling the dcaches............................................................................. 6 ? 5 6.3 write buffer (wb) .............................................................................................. 6 ? 5 6.3.1 bufferable bit ................................................................................................. 6 ? 5 6.3.2 write buffer operation ................................................................................... 6 ? 5 6.3.2.1 writes to a bufferable and cacheable location (b=1,c=1)..................... 6 ? 5 6.3.2.2 writes to a bufferable and noncacheable location (b=1,c=0)............... 6 ? 6 6.3.2.3 unbufferable writes (b=0)....................................................................... 6 ? 6 6.3.3 enabling the write buffer............................................................................... 6 ? 6 6.3.3.1 disabling the write buffer........................................................................ 6 ? 6 6.4 read buffer (rb)............................................................................................... 6 ? 6 7 memory management unit (mmu) .............................................................................. 7 ? 1 7.1 overview ........................................................................................................... 7 ? 1 7.1.1 mmu registers .............................................................................................. 7 ? 1 7.2 mmu faults and cpu aborts............................................................................ 7 ? 1 7.3 data aborts ....................................................................................................... 7 ? 1 7.3.1 cacheable reads (linefetches) .................................................................... 7 ? 2 7.3.2 buffered writes .............................................................................................. 7 ? 2 7.4 interaction of the mmu, icache, dcache, and write buffer ............................... 7 ? 2 7.5 mini data cache................................................................................................ 7 ? 3 8 clocks ........................................................................................................................ ... 8 ? 1 8.1 intel ? strongarm sa-1110 crystal oscillators ................................................ 8 ? 2 8.2 core clock configuration register.................................................................... 8 ? 2 8.2.1 restrictions on changing the core clock configuration ............................... 8 ? 3 8.3 driving intel ? strongarm sa-1110 crystal pins from an external source ...... 8 ? 3 8.4 clocking during test......................................................................................... 8 ? 4
sa-1110 developer ? s manual v 9 system control module ...............................................................................................9 ? 1 9.1 general-purpose i/o .........................................................................................9 ? 1 9.1.1 gpio register definitions..............................................................................9 ? 2 9.1.1.1 gpio pin-level register (gplr) ............................................................9 ? 3 9.1.1.2 gpio pin direction register (gpdr) ......................................................9 ? 4 9.1.1.3 gpio pin output set register (gpsr) and pin output clear register (gpcr) ............................................................................9 ? 5 9.1.1.4 gpio rising-edge detect register (grer) and falling-edge detect register (gfer) .....................................................9 ? 6 9.1.1.5 gpio edge detect status register (gedr) ...........................................9 ? 7 9.1.1.6 gpio alternate function register (gafr)..............................................9 ? 8 9.1.2 gpio alternate functions..............................................................................9 ? 9 9.1.2.1 3.6864 mhz option for gp 27 alternate output function ..................... 9 ? 10 9.1.3 gpio register locations ............................................................................. 9 ? 10 9.2 interrupt controller .......................................................................................... 9 ? 11 9.2.1 interrupt controller register definitions....................................................... 9 ? 12 9.2.1.1 interrupt controller pending register (icpr) ........................................9 ? 12 9.2.1.2 interrupt controller irq pending register (icip) and fiq pending register (icfp) ................................................................ 9 ? 14 9.2.1.3 interrupt controller mask register (icmr) ............................................ 9 ? 15 9.2.1.4 interrupt controller level register (iclr) ............................................. 9 ? 16 9.2.1.5 interrupt controller control register (iccr) ......................................... 9 ? 17 9.2.2 interrupt controller register locations ........................................................ 9 ? 18 9.3 real-time clock.............................................................................................. 9 ? 18 9.3.1 rtc counter register (rcnr) ................................................................... 9 ? 18 9.3.2 rtc alarm register (rtar) ....................................................................... 9 ? 19 9.3.3 rtc status register (rtsr)....................................................................... 9 ? 19 9.3.4 rtc trim register (rttr).......................................................................... 9 ? 20 9.3.5 trim procedure ............................................................................................ 9 ? 20 9.3.5.1 oscillator frequency calibration ...........................................................9 ? 20 9.3.5.2 rttr value calculations ...................................................................... 9 ? 21 9.3.6 real-time clock register locations ...........................................................9 ? 22 9.4 operating system timer ................................................................................. 9 ? 22 9.4.1 os timer count register (oscr)............................................................... 9 ? 23 9.4.2 os timer match registers 0 ? 3 (osmr 0, osmr 1, osmr 2, osmr 3)... 9 ? 23 9.4.3 os timer watchdog match enable register (ower) ................................ 9 ? 23 9.4.4 os timer status register (ossr) .............................................................. 9 ? 24 9.4.5 os timer interrupt enable register (oier) ................................................ 9 ? 25 9.4.6 watchdog timer .......................................................................................... 9 ? 25 9.4.7 os timer register locations....................................................................... 9 ? 26 9.5 power manager .............................................................................................. 9 ? 26 9.5.1 run mode .................................................................................................... 9 ? 26 9.5.2 idle mode ..................................................................................................... 9 ? 26 9.5.2.1 entering idle mode ................................................................................ 9 ? 27 9.5.2.2 exiting idle mode ................................................................................... 9 ? 27 9.5.3 sleep mode..................................................................................................9 ? 28 9.5.3.1 cpu preparation for sleep mode .......................................................... 9 ? 28 9.5.3.2 events causing entry into sleep mode ................................................. 9 ? 28 9.5.3.3 the sleep shutdown sequence ............................................................ 9 ? 28 9.5.3.4 during sleep mode................................................................................ 9 ? 29 9.5.3.5 the sleep wake-up sequence ............................................................. 9 ? 29
vi sa-1110 developer ? s manual 9.5.3.6 booting after sleep mode...................................................................... 9 ? 30 9.5.3.7 reviving the drams from self-refresh mode ...................................... 9 ? 31 9.5.4 notes on power supply sequencing ........................................................... 9 ? 31 9.5.5 assumed behavior of an intel ? strongarm sa-1110 system in sleep mode................................................................................. 9 ? 31 9.5.6 pin operation in sleep mode....................................................................... 9 ? 33 9.5.7 power manager registers ........................................................................... 9 ? 34 9.5.7.1 power manager control register (pmcr) ............................................ 9 ? 34 9.5.7.2 power manager general configuration register (pcfr) ..................... 9 ? 35 9.5.7.3 power manager pll configuration register (ppcr)............................ 9 ? 37 9.5.7.4 power manager wake-up enable register (pwer) ............................ 9 ? 37 9.5.7.5 power manager sleep status register (pssr) .................................... 9 ? 38 9.5.7.6 power manager scratch pad register (pspr) ..................................... 9 ? 40 9.5.7.7 power manager gpio sleep state register (pgsr)............................ 9 ? 40 9.5.7.8 power manager oscillator status register (posr) .............................. 9 ? 41 9.5.8 power manager register locations ............................................................ 9 ? 41 9.6 reset controller .............................................................................................. 9 ? 42 9.6.1 reset controller registers .......................................................................... 9 ? 42 9.6.1.1 reset controller software reset register (rsrr) ............................... 9 ? 42 9.6.1.2 reset controller status register (rcsr) ............................................. 9 ? 44 9.6.2 reset controller register locations ............................................................ 9 ? 44 10 memory and pcmcia control module ..................................................................... 10 ? 1 10.1 overview of operation .................................................................................... 10 ? 2 10.1.1 memory system examples .......................................................................... 10 ? 4 10.1.2 types of memory accesses ........................................................................ 10 ? 7 10.1.3 reads .......................................................................................................... 10 ? 7 10.1.4 writes ......................................................................................................... 10 ? 7 10.1.5 transaction summary ................................................................................ 10 ? 7 10.1.6 read-lock-write.......................................................................................... 10 ? 8 10.1.7 aborts and nonexistent memory ................................................................ 10 ? 8 10.2 memory configuration registers.................................................................... 10 ? 9 10.2.1 dram configuration register (mdcnfg) ................................................ 10 ? 10 10.2.2 dram refresh control register (mdrefr)............................................. 10 ? 14 10.2.3 cas waveform rotate registers (mdcas00, mdcas01, mdcas02, mdcas20, mdcas21, mdcas22) .......................................................... 10 ? 18 10.2.3.1 mdcas registers with asynchronous dram..................................... 10 ? 18 10.2.3.2 mdcas registers with sdram and smrom .................................... 10 ? 19 10.2.4 static memory control registers (msc2 ? 0) ........................................... 10 ? 20 10.2.5 expansion memory (pcmcia) configuration register (mecr)................ 10 ? 23 10.3 smrom configuration register (smcnfg)................................................. 10 ? 25 10.3.1 changing smrom ras latency .............................................................. 10 ? 28 10.4 dynamic interface operation ........................................................................ 10 ? 29 10.4.1 dram overview ........................................................................................ 10 ? 29 10.4.2 dram timing ............................................................................................ 10 ? 31 10.4.3 sdram overview...................................................................................... 10 ? 33 10.4.4 sdram commands .................................................................................. 10 ? 34 10.4.5 sdram state machine.............................................................................. 10 ? 35 10.4.6 dram/sdram refresh ............................................................................ 10 ? 40 10.4.7 dram/sdram self-refresh in sleep mode ............................................. 10 ? 41 10.5 static memory interface ................................................................................ 10 ? 42
sa-1110 developer ? s manual vii 10.5.1 rom interface overview ........................................................................... 10 ? 43 10.5.2 rom timing diagrams and parameters.................................................... 10 ? 43 10.5.3 sram interface overview ......................................................................... 10 ? 46 10.5.4 sram timing diagrams and parameters.................................................. 10 ? 46 10.5.5 variable latency i/o interface overview ................................................... 10 ? 48 10.5.6 variable latency i/o timing diagrams and parameters ........................... 10 ? 48 10.5.7 flash memory interface overview .......................................................... 10 ? 51 10.5.8 flash memory timing diagrams and parameters ................................. 10 ? 51 10.5.9 smrom overview ..................................................................................... 10 ? 52 10.5.10 smrom commands.................................................................................. 10 ? 52 10.5.11 smrom state machine ............................................................................. 10 ? 53 10.6 pcmcia overview ........................................................................................ 10 ? 55 10.6.1 32-bit data bus operation........................................................................ 10 ? 57 10.6.2 external logic for pcmcia implementation ............................................10 ? 58 10.6.3 pcmcia interface timing diagrams and parameters ...............................10 ? 61 10.7 memory interface reset and initialization ..................................................... 10 ? 63 10.7.1 hardware or sleep reset procedures ....................................................... 10 ? 64 10.7.2 software or watchdog reset procedures ................................................. 10 ? 65 10.8 alternate memory bus master mode............................................................. 10 ? 65 11 peripheral control module ........................................................................................ 11 ? 1 11.1 read/write interface ....................................................................................... 11 ? 1 11.2 memory organization ...................................................................................... 11 ? 2 11.3 interrupts ......................................................................................................... 11 ? 3 11.4 peripheral pins ................................................................................................ 11 ? 4 11.5 use of the gpio pins for alternate functions................................................. 11 ? 5 11.6 dma controller................................................................................................ 11 ? 6 11.6.1 dma register definitions............................................................................. 11 ? 6 11.6.1.1 dma device address register (ddarn) ..............................................11 ? 7 11.6.1.2 dma control/status register (dcsrn) ............................................... 11 ? 10 11.6.1.3 dma buffer a start address register (dbsan) .................................. 11 ? 11 11.6.1.4 dma buffer a transfer count register (dbtan) ................................ 11 ? 12 11.6.1.5 dma buffer b start address register (dbsbn) .................................. 11 ? 12 11.6.1.6 dma buffer b transfer count register (dbtbn) ................................ 11 ? 12 11.6.2 dma operation .........................................................................................11 ? 13 11.6.3 dma register list...................................................................................... 11 ? 13 11.7 lcd controller............................................................................................... 11 ? 15 11.7.1 lcd controller operation .......................................................................... 11 ? 17 11.7.1.1 dma to memory interface.................................................................... 11 ? 17 11.7.1.2 frame buffer........................................................................................ 11 ? 17 11.7.1.3 input fifo ........................................................................................... 11 ? 22 11.7.1.4 lookup palette..................................................................................... 11 ? 22 11.7.1.5 color/gray-scale dithering.................................................................. 11 ? 23 11.7.1.6 output fifo.........................................................................................11 ? 23 11.7.1.7 lcd controller pins ............................................................................. 11 ? 24 11.7.2 lcd controller register definitions........................................................... 11 ? 24 11.7.3 lcd controller control register 0 ............................................................. 11 ? 25 11.7.3.1 lcd enable (len) ............................................................................... 11 ? 25 11.7.3.2 color/monochrome select (cms)........................................................ 11 ? 25 11.7.3.3 single-/dual-panel select (sds) .........................................................11 ? 25 11.7.3.4 lcd disable done interrupt mask (ldm) ............................................11 ? 28
viii sa-1110 developer ? s manual 11.7.3.5 base address update interrupt mask (bam) ...................................... 11 ? 28 11.7.3.6 error interrupt mask (erm) ................................................................. 11 ? 28 11.7.3.7 passive/active display select (pas)................................................... 11 ? 28 11.7.3.8 big/little endian select (ble) ............................................................. 11 ? 30 11.7.3.9 double-pixel data (dpd) pin mode .................................................... 11 ? 30 11.7.3.10 palette dma request delay (pdd)..................................................... 11 ? 30 11.7.4 lcd controller control register 1............................................................. 11 ? 33 11.7.4.1 pixels per line (ppl) .......................................................................... 11 ? 33 11.7.4.2 horizontal sync pulse width (hsw) ................................................... 11 ? 33 11.7.4.3 end-of-line pixel clock wait count (elw) ......................................... 11 ? 33 11.7.4.4 beginning-of-line pixel clock wait count (blw)................................ 11 ? 34 11.7.5 lcd controller control register 2............................................................. 11 ? 35 11.7.5.1 lines per panel (lpp) ......................................................................... 11 ? 35 11.7.5.2 vertical sync pulse width (vsw)........................................................ 11 ? 35 11.7.5.3 end-of-frame line clock wait count (efw) ...................................... 11 ? 36 11.7.5.4 beginning-of-frame line clock wait count (bfw)............................. 11 ? 36 11.7.6 lcd controller control register 3............................................................. 11 ? 38 11.7.6.1 pixel clock divider (pcd).................................................................... 11 ? 38 11.7.6.2 ac bias pin frequency (acb)............................................................. 11 ? 38 11.7.6.3 ac bias pin transitions per interrupt (api)......................................... 11 ? 39 11.7.6.4 vertical sync polarity (vsp) ................................................................ 11 ? 39 11.7.6.5 horizontal sync polarity (hsp)............................................................ 11 ? 39 11.7.6.6 pixel clock polarity (pcp) ................................................................... 11 ? 39 11.7.6.7 output enable polarity (oep).............................................................. 11 ? 40 11.7.7 lcd controller dma registers.................................................................. 11 ? 41 11.7.8 dma channel 1 base address register ................................................... 11 ? 42 11.7.9 dma channel 1 current address register................................................ 11 ? 43 11.7.10 dma channel 2 base and current address registers.............................. 11 ? 44 11.7.11 lcd controller status register ................................................................. 11 ? 45 11.7.11.1 lcd disable done flag (ldd) (read/write, maskable interrupt) ......... 11 ? 45 11.7.11.2 base address update flag (bau) (read-only, maskable interrupt)..... 11 ? 45 11.7.11.3 bus error status (ber) (read/write, maskable interrupt)..................... 11 ? 45 11.7.11.4 ac bias count status (abc) (read/write, nonmaskable interrupt) ...... 11 ? 46 11.7.11.5 input fifo overrun lower panel status (iol) (read/write, maskable interrupt).............................................................................. 11 ? 46 11.7.11.6 input fifo underrun lower panel status (iul) (read/write, maskable interrupt).............................................................................. 11 ? 46 11.7.11.7 input fifo overrun upper panel status (iou) (read/write, maskable interrupt).............................................................................. 11 ? 46 11.7.11.8 input fifo underrun upper panel status (iuu) (read/write, maskable interrupt).............................................................................. 11 ? 46 11.7.11.9 output fifo overrun lower panel status (ool) (read/write, maskable interrupt).............................................................................. 11 ? 46 11.7.11.10output fifo underrun lower panel status (oul) (read/write, maskable interrupt).............................................................................. 11 ? 47 11.7.11.11output fifo overrun upper panel status (oou) (read/write, maskable interrupt).............................................................................. 11 ? 47 11.7.11.12output fifo underrun upper panel status (ouu) (read/write, maskable interrupt).............................................................................. 11 ? 47 11.7.12 lcd controller register locations ............................................................ 11 ? 49 11.7.13 lcd controller pin timing diagrams ........................................................ 11 ? 50 11.8 serial port 0 ? usb device controller .......................................................... 11 ? 55 11.8.1 usb operation .......................................................................................... 11 ? 56
sa-1110 developer ? s manual ix 11.8.1.1 signalling levels.................................................................................. 11 ? 56 11.8.1.2 connecting the usb to the sa-1110 ................................................... 11 ? 57 11.8.1.3 bit encoding ........................................................................................ 11 ? 58 11.8.1.4 field formats....................................................................................... 11 ? 59 11.8.1.5 packet formats ...................................................................................11 ? 60 11.8.1.6 transaction formats............................................................................11 ? 61 11.8.1.7 udc device requests......................................................................... 11 ? 62 11.8.2 udc register definitions........................................................................... 11 ? 63 11.8.3 udc control register ................................................................................ 11 ? 63 11.8.3.1 udc disable (udd)............................................................................. 11 ? 64 11.8.3.2 udc active (uda) ............................................................................... 11 ? 64 11.8.3.3 resume interrupt mask (resm) .........................................................11 ? 65 11.8.3.4 endpoint 0 interrupt mask (eim).......................................................... 11 ? 65 11.8.3.5 receive interrupt mask (rim)............................................................. 11 ? 65 11.8.3.6 transmit interrupt mask (tim) ............................................................ 11 ? 65 11.8.3.7 suspend interrupt mask (susm).........................................................11 ? 65 11.8.3.8 software control of the udc ...............................................................11 ? 66 11.8.4 udc address register .............................................................................. 11 ? 67 11.8.5 udc out max packet register ................................................................ 11 ? 67 11.8.6 udc in max packet register .................................................................... 11 ? 68 11.8.7 udc endpoint 0 control/status register................................................... 11 ? 68 11.8.7.1 out packet ready (opr) .................................................................. 11 ? 68 11.8.7.2 in packet ready (ipr) ........................................................................ 11 ? 68 11.8.7.3 sent stall (sst) ...................................................................................11 ? 68 11.8.7.4 force stall (fst) ................................................................................. 11 ? 68 11.8.7.5 data end (de) ..................................................................................... 11 ? 69 11.8.7.6 setup end (se).................................................................................... 11 ? 69 11.8.7.7 serviced opr (so) ............................................................................. 11 ? 69 11.8.7.8 serviced setup end (sse) .................................................................. 11 ? 69 11.8.8 udc endpoint 1 control/status register................................................... 11 ? 70 11.8.8.1 receive fifo service (rfs) ...............................................................11 ? 70 11.8.8.2 receive packet complete (rpc) ........................................................ 11 ? 71 11.8.8.3 receive packet error (rpe) ................................................................ 11 ? 71 11.8.8.4 sent stall (sst) ...................................................................................11 ? 71 11.8.8.5 force stall (fst) ................................................................................. 11 ? 71 11.8.8.6 receive fifo not empty (rne).......................................................... 11 ? 71 11.8.9 udc endpoint 2 control/status register................................................... 11 ? 72 11.8.9.1 transmit fifo service (tfs) .............................................................. 11 ? 72 11.8.9.2 transmit packet complete (tpc)........................................................ 11 ? 72 11.8.9.3 transmit packet error (tpe) .............................................................. 11 ? 73 11.8.9.4 transmit underrun (tur) .................................................................... 11 ? 73 11.8.9.5 sent stall (sst) ............................................................................... 11 ? 73 11.8.9.6 force stall (fst) ............................................................................. 11 ? 73 11.8.10 udc endpoint 0 data register.................................................................. 11 ? 74 11.8.11 udc endpoint 0 write count register ...................................................... 11 ? 75 11.8.12 udc data register .................................................................................... 11 ? 75 11.8.13 udc status/interrupt register ................................................................... 11 ? 76 11.8.13.1 endpoint 0 interrupt request (eir) ..................................................... 11 ? 76 11.8.13.2 receive interrupt request (rir) .........................................................11 ? 76 11.8.13.3 transmit interrupt request (tir).........................................................11 ? 77 11.8.13.4 suspend interrupt request (susir) ................................................... 11 ? 77 11.8.13.5 resume interrupt request (resir) .................................................... 11 ? 77 11.8.13.6 reset interrupt request (rstir) ....................................................... 11 ? 77
x sa-1110 developer ? s manual 11.8.14 udc register locations ............................................................................ 11 ? 78 11.9 serial port 1 ? gpclk/uart ....................................................................... 11 ? 78 11.9.1 gpclk operation...................................................................................... 11 ? 79 11.9.1.1 simultaneous use of the uart and gpclk ...................................... 11 ? 79 11.9.2 gpclk control register 0 ........................................................................ 11 ? 79 11.9.2.1 gpclk/uart select (sus)................................................................ 11 ? 79 11.9.2.2 sample clock enable (sce) ............................................................... 11 ? 79 11.9.2.3 sample clock direction (scd) ............................................................ 11 ? 80 11.9.3 gpclk control register 1 ........................................................................ 11 ? 81 11.9.3.1 transmit enable (txe) ........................................................................ 11 ? 81 11.9.4 gpclk control registers 2 and 3............................................................. 11 ? 82 11.9.4.1 baud rate divisor (brd)..................................................................... 11 ? 82 11.9.5 uart register locations .......................................................................... 11 ? 83 11.9.6 gpclk register locations........................................................................ 11 ? 84 11.10 serial port 2 ? infrared communications port (icp) ..................................... 11 ? 84 11.10.1 low-speed icp operation......................................................................... 11 ? 85 11.10.1.1 hp-sir* modulation ............................................................................ 11 ? 85 11.10.1.2 uart frame format ........................................................................... 11 ? 85 11.10.2 high-speed icp operation ........................................................................ 11 ? 86 11.10.2.1 4ppm modulation ................................................................................ 11 ? 86 11.10.2.2 hssp frame format ........................................................................... 11 ? 87 11.10.2.3 address field....................................................................................... 11 ? 88 11.10.2.4 control field ........................................................................................ 11 ? 88 11.10.2.5 data field ............................................................................................ 11 ? 88 11.10.2.6 crc field ............................................................................................ 11 ? 88 11.10.2.7 baud rate generation......................................................................... 11 ? 89 11.10.2.8 receive operation............................................................................... 11 ? 89 11.10.2.9 transmit operation.............................................................................. 11 ? 90 11.10.2.10transmit and receive fifos.............................................................. 11 ? 91 11.10.2.11cpu and dma register access sizes ............................................... 11 ? 92 11.10.3 uart register definition .......................................................................... 11 ? 92 11.10.4 uart control register 4........................................................................... 11 ? 92 11.10.4.1 hp-sir* enable (hse) ........................................................................ 11 ? 92 11.10.4.2 low-power mode (lpm)...................................................................... 11 ? 92 11.10.5 hssp register definitions......................................................................... 11 ? 93 11.10.6 hssp control register 0........................................................................... 11 ? 93 11.10.6.1 irda transmission rate (itr) ............................................................. 11 ? 93 11.10.6.2 loopback mode (lbm) ........................................................................ 11 ? 94 11.10.6.3 transmit fifo underrun select (tus)................................................ 11 ? 94 11.10.6.4 transmit enable (txe) ........................................................................ 11 ? 95 11.10.6.5 receive enable (rxe)......................................................................... 11 ? 95 11.10.6.6 receive fifo interrupt enable (rie) .................................................. 11 ? 95 11.10.6.7 transmit fifo interrupt enable (tie).................................................. 11 ? 96 11.10.6.8 address match enable (ame) ............................................................. 11 ? 96 11.10.7 hssp control register 1........................................................................... 11 ? 97 11.10.7.1 address match value (amv) ............................................................... 11 ? 97 11.10.8 hssp control register 2........................................................................... 11 ? 98 11.10.8.1 transmit pin polarity select (txp) ...................................................... 11 ? 98 11.10.8.2 receive pin polarity select (rxp)....................................................... 11 ? 99 11.10.9 hssp data register ................................................................................ 11 ? 100 11.10.10hssp status register 0 ......................................................................... 11 ? 102 11.10.10.1end/error in fifo status (eif) (read-only, nonmaskable interrupt) . 11 ? 102
sa-1110 developer ? s manual xi 11.10.10.2transmit underrun status (tur) (read/write, maskable interrupt) ...11 ? 102 11.10.10.3receiver abort status (rab) (read/write, nonmaskable interrupt) ...11 ? 102 11.10.10.4transmit fifo service request flag (tfs) (read-only, maskable interrupt) ............................................................................11 ? 103 11.10.10.5receive fifo service request flag (rfs) (read-only, maskable interrupt) ............................................................................11 ? 103 11.10.10.6framing error status (fre) (read/write, nonmaskable interrupt) .....11 ? 104 11.10.11hssp status register 1 .........................................................................11 ? 105 11.10.11.1receiver synchronized flag (rsy) (read-only, noninterruptible) .....11 ? 105 11.10.11.2transmitter busy flag (tby) (read-only, noninterruptible) ...............11 ? 105 11.10.11.3receive fifo not empty flag (rne) (read-only, noninterruptible)..11 ? 105 11.10.11.4transmit fifo not full flag (tnf) (read-only, noninterruptible)......11 ? 105 11.10.11.5end-of-frame flag (eof) (read-only, noninterruptible)....................11 ? 105 11.10.11.6crc error status (cre) (read-only, noninterruptible)......................11 ? 106 11.10.11.7receiver overrun status (ror) (read-only, noninterruptible) ..........11 ? 106 11.10.12uart register locations .......................................................................11 ? 108 11.10.13hssp register locations .......................................................................11 ? 108 11.11 serial port 3 ? uart...................................................................................11 ? 109 11.11.1 uart operation ......................................................................................11 ? 109 11.11.1.1 frame format....................................................................................11 ? 110 11.11.1.2 baud rate generation.......................................................................11 ? 110 11.11.1.3 receive operation.............................................................................11 ? 110 11.11.1.4 transmit operation............................................................................11 ? 111 11.11.1.5 transmit and receive fifos.............................................................11 ? 111 11.11.1.6 cpu and dma register access sizes ..............................................11 ? 111 11.11.2 uart register definitions.......................................................................11 ? 111 11.11.3 uart control register 0 .........................................................................11 ? 112 11.11.3.1 parity enable (pe) .............................................................................11 ? 112 11.11.3.2 odd/even parity select (oes) ..........................................................11 ? 112 11.11.3.3 stop bit select (sbs) ........................................................................11 ? 112 11.11.3.4 data size select (dss) .....................................................................11 ? 112 11.11.3.5 sample clock enable (sce) .............................................................11 ? 113 11.11.3.6 receive clock edge select (rce) ....................................................11 ? 113 11.11.3.7 transmit clock edge select (tce)....................................................11 ? 113 11.11.4 uart control registers 1 and 2 .............................................................11 ? 115 11.11.4.1 baud rate divisor (brd)...................................................................11 ? 115 11.11.5 uart control register 3 .........................................................................11 ? 116 11.11.5.1 receiver enable (rxe) .....................................................................11 ? 116 11.11.5.2 transmitter enable (txe) ..................................................................11 ? 116 11.11.5.3 break (brk) ......................................................................................11 ? 116 11.11.5.4 receive fifo interrupt enable (rie) ................................................11 ? 117 11.11.5.5 transmit fifo interrupt enable (tie) ................................................11 ? 117 11.11.5.6 loopback mode (lbm) ......................................................................11 ? 117 11.11.6 uart data register ................................................................................11 ? 118 11.11.7 uart status register 0 ..........................................................................11 ? 120 11.11.7.1 transmit fifo service request flag (tfs) (read-only, maskable interrupt) ............................................................................11 ? 120 11.11.7.2 receive fifo service request flag (rfs) (read-only, maskable interrupt)11 ? 120 11.11.7.3 receiver idle status (rid) (read/write, maskable interrupt) ..............11 ? 121 11.11.7.4 receiver begin of break status (rbb) (read/write, nonmaskable interrupt) ......................................................................11 ? 121 11.11.7.5 receiver end of break status (reb) (read/write,
xii sa-1110 developer ? s manual nonmaskable interrupt)...................................................................... 11 ? 121 11.11.7.6 error in fifo flag (eif) (read-only, nonmaskable interrupt)............. 11 ? 121 11.11.8 uart status register 1 .......................................................................... 11 ? 123 11.11.8.1 transmitter busy flag (tby) (read-only, noninterruptible)................ 11 ? 123 11.11.8.2 receive fifo not empty flag (rne) (read-only, noninterruptible) .. 11 ? 123 11.11.8.3 transmit fifo not full flag (tnf) (read-only, noninterruptible) ...... 11 ? 123 11.11.8.4 parity error flag (pre) (read-only, noninterruptible) ........................ 11 ? 123 11.11.8.5 framing error flag (fre) (read-only, noninterruptible)..................... 11 ? 124 11.11.8.6 receiver overrun flag (ror) (read-only, noninterruptible).............. 11 ? 124 11.11.9 uart register locations ........................................................................ 11 ? 126 11.12 serial port 4 ? mcp / ssp .......................................................................... 11 ? 126 11.12.1 mcp operation ........................................................................................ 11 ? 127 11.12.1.1 frame format.................................................................................... 11 ? 128 11.12.1.2 audio and telecom sample rates and data transfer ...................... 11 ? 129 11.12.1.3 mcp transmit and receive fifo operation..................................... 11 ? 130 11.12.1.4 codec control register data transfer .............................................. 11 ? 131 11.12.1.5 external clock operation................................................................... 11 ? 132 11.12.1.6 alternate ssp pin assignment .......................................................... 11 ? 132 11.12.1.7 cpu and dma register access sizes .............................................. 11 ? 132 11.12.2 mcp register definitions ........................................................................ 11 ? 133 11.12.3 mcp control register 0........................................................................... 11 ? 133 11.12.3.1 audio sample rate divisor (asd)..................................................... 11 ? 133 11.12.3.2 telecom sample rate divisor (tsd) ................................................ 11 ? 134 11.12.3.3 multimedia communications port enable (mce) .............................. 11 ? 135 11.12.3.4 external clock select (ecs).............................................................. 11 ? 135 11.12.3.5 a/d sampling mode (adm) ............................................................... 11 ? 135 11.12.3.6 telecom transmit fifo interrupt enable (tte)................................ 11 ? 136 11.12.3.7 telecom receive fifo interrupt enable (tre) ................................ 11 ? 136 11.12.3.8 audio transmit fifo interrupt enable (ate) .................................... 11 ? 136 11.12.3.9 audio receive fifo interrupt enable (are)..................................... 11 ? 136 11.12.3.10loopback mode (lbm) ..................................................................... 11 ? 137 11.12.3.11external clock prescaler (ecp)........................................................ 11 ? 137 11.12.4 mcp control register 1........................................................................... 11 ? 140 11.12.4.1 clock frequency select (cfs) .......................................................... 11 ? 140 11.12.5 mcp data registers ................................................................................ 11 ? 141 11.12.5.1 mcp data register 0......................................................................... 11 ? 141 11.12.5.2 mcp data register 1......................................................................... 11 ? 142 11.12.5.3 mcp data register 2......................................................................... 11 ? 143 11.12.6 mcp status register ............................................................................... 11 ? 145 11.12.6.1 audio transmit fifo service request flag (ats) (read-only, maskable interrupt)............................................................................ 11 ? 145 11.12.6.2 audio receive fifo service request flag (ars) (read-only, maskable interrupt)............................................................................ 11 ? 146 11.12.6.3 telecom transmit fifo service request flag (tts) (read-only, maskable interrupt)............................................................................ 11 ? 146 11.12.6.4 telecom receive fifo service request flag (trs) (read-only, maskable interrupt)............................................................................ 11 ? 146 11.12.6.5 audio transmit fifo underrun status (atu) (read/write, nonmaskable interrupt)...................................................................... 11 ? 146 11.12.6.6 audio receive fifo overrun status (aro) (read/write, nonmaskable interrupt)...................................................................... 11 ? 147 11.12.6.7 telecom transmit fifo underrun status (ttu) (read/write, nonmaskable interrupt)...................................................................... 11 ? 147
sa-1110 developer ? s manual xiii 11.12.6.8 telecom receive fifo overrun status (tro) (read/write, nonmaskable interrupt) ......................................................................11 ? 147 11.12.6.9 audio transmit fifo not full flag (anf) (read-only, noninterruptible).................................................................................11 ? 147 11.12.6.10audio receive fifo not empty flag (ane) (read-only, noninterruptible).................................................................................11 ? 147 11.12.6.11telecom transmit fifo not full flag (tnf) (read-only, noninterruptible).................................................................................11 ? 148 11.12.6.12telecom receive fifo not empty flag (tne) (read-only, noninterruptible).................................................................................11 ? 148 11.12.6.13codec write completed flag (cwc) (read-only, noninterruptible) ..11 ? 148 11.12.6.14codec read completed flag (crc) (read-only, noninterruptible) ...11 ? 148 11.12.6.15audio codec enabled flag (ace) (read-only, noninterruptible) .......11 ? 148 11.12.6.16telecom codec enabled flag (tce) (read-only, noninterruptible)...11 ? 149 11.12.7 ssp operation.........................................................................................11 ? 151 11.12.7.1 frame format....................................................................................11 ? 151 11.12.7.2 baud rate generation.......................................................................11 ? 155 11.12.7.3 ssp transmit and receive fifos ....................................................11 ? 155 11.12.7.4 cpu and dma register access sizes ..............................................11 ? 156 11.12.7.5 alternate ssp pin assignment ..........................................................11 ? 156 11.12.8 ssp register definitions .........................................................................11 ? 156 11.12.9 ssp control register 0............................................................................11 ? 156 11.12.9.1 data size select (dss) .....................................................................11 ? 157 11.12.9.2 frame format (frf) .........................................................................11 ? 157 11.12.9.3 synchronous serial port enable (sse) .............................................11 ? 157 11.12.9.4 serial clock rate (scr) ....................................................................11 ? 158 11.12.10ssp control register 1...........................................................................11 ? 159 11.12.10.1receive fifo interrupt enable (rie)................................................11 ? 159 11.12.10.2transmit fifo interrupt enable (tie) ...............................................11 ? 159 11.12.10.3loopback mode (lbm) .....................................................................11 ? 160 11.12.10.4serial clock polarity (spo)...............................................................11 ? 160 11.12.10.5serial clock phase (sph).................................................................11 ? 160 11.12.10.6external clock select (ecs) .............................................................11 ? 161 11.12.11ssp data register..................................................................................11 ? 162 11.12.12ssp status register ...............................................................................11 ? 164 11.12.12.1transmit fifo not full flag (tnf) (read-only, noninterruptible)......11 ? 164 11.12.12.2receive fifo not empty flag (rne) (read-only, noninterruptible)..11 ? 164 11.12.12.3ssp busy flag (bsy) (read-only, noninterruptible) ..........................11 ? 164 11.12.12.4transmit fifo service request flag (tfs) (read-only, maskable interrupt) ............................................................................11 ? 164 11.12.12.5receive fifo service request flag (rfs) (read-only, maskable interrupt) ............................................................................11 ? 165 11.12.12.6receiver overrun status (ror) (read/write, nonmaskable interrupt) ......................................................................11 ? 165 11.12.13mcp register locations .........................................................................11 ? 166 11.12.14ssp register locations..........................................................................11 ? 167 11.13 peripheral pin controller (ppc) ..................................................................11 ? 167 11.13.1 ppc operation.........................................................................................11 ? 167 11.13.2 ppc register definitions .........................................................................11 ? 168 11.13.3 ppc pin direction register......................................................................11 ? 168 11.13.4 ppc pin state register ...........................................................................11 ? 170 11.13.5 ppc pin assignment register .................................................................11 ? 172 11.13.5.1 uart pin reassignment (upr)........................................................11 ? 172
xiv sa-1110 developer ? s manual 11.13.5.2 ssp pin reassignment (spr) .......................................................... 11 ? 172 11.13.6 ppc sleep mode pin direction register ................................................. 11 ? 173 11.13.7 ppc pin flag register............................................................................. 11 ? 175 11.13.8 ppc register locations .......................................................................... 11 ? 177 12 dc parameters ........................................................................................................... 12 ? 1 12.1 absolute maximum ratings ............................................................................ 12 ? 1 12.2 dc operating conditions ................................................................................ 12 ? 2 12.3 power supply voltages and currents ............................................................. 12 ? 3 13 ac parameters ........................................................................................................... 13 ? 1 13.1 test conditions ............................................................................................... 13 ? 1 13.2 model considerations ..................................................................................... 13 ? 2 13.3 memory bus and pcmcia signal timings ..................................................... 13 ? 2 13.4 lcd controller signals.................................................................................... 13 ? 3 13.5 mcp signals ................................................................................................... 13 ? 3 13.6 timing parameters.......................................................................................... 13 ? 4 13.6.1 asynchronous signal timing descriptions .................................................. 13 ? 6 14 package and pinout ................................................................................................... 14 ? 1 15 debug support ........................................................................................................... 15 ? 1 15.1 instruction breakpoint ..................................................................................... 15 ? 1 15.2 data breakpoint .............................................................................................. 15 ? 1 16 boundary-scan test interface .................................................................................. 16 ? 1 16.1 overview ......................................................................................................... 16 ? 1 16.2 reset............................................................................................................... 16 ? 2 16.3 pull-up resistors ............................................................................................ 16 ? 2 16.4 instruction register ......................................................................................... 16 ? 2 16.5 public instructions ........................................................................................... 16 ? 2 16.5.1 extest (00000) ......................................................................................... 16 ? 3 16.5.2 sample/preload (00001) ...................................................................... 16 ? 3 16.5.3 clamp (00100) ........................................................................................... 16 ? 3 16.5.4 highz (00101) ............................................................................................ 16 ? 4 16.5.5 idcode (00110) ......................................................................................... 16 ? 4 16.5.6 bypass (11111)......................................................................................... 16 ? 4 16.6 test data registers ........................................................................................ 16 ? 5 16.6.1 bypass register .......................................................................................... 16 ? 5 16.6.2 intel ? strongarm sa-1110 device identification (id) code register.............................................................................................. 16 ? 6 16.6.3 intel ? strongarm sa-1110 boundary-scan (bs) register ........................ 16 ? 6 16.7 boundary-scan interface signals.................................................................... 16 ? 7 a register summary ...................................................................................................... a ? 1 b3.6864 ? mhz oscillator specifications....................................................................... b ? 1 b.1 specifications ....................................................................................................b ? 1 b.1.1 system specifications ...................................................................................b ? 1 b.1.1.1 parasitic capacitance off-chip between pxtal and pextal .........................................................................................b ? 2 b.1.1.2 parasitic capacitance off-chip between pxtal
sa-1110 developer ? s manual xv or pextal and vss ............................................................................ b ? 2 b.1.1.3 parasitic resistance between pxtal and pextal ........................... b ? 2 b.1.1.4 parasitic resistance between pxtal or pextal and vss ............................................................................................... b ? 2 b.1.2 quartz crystal specification ......................................................................... b ? 3 c32.768 ? khz oscillator specifications ....................................................................... c ? 1 c.1 specifications ................................................................................................... c ? 1 c.1.1 system specifications .................................................................................. c ? 1 c.1.1.1 temperature range ............................................................................. c ? 1 c.1.1.2 current consumption ........................................................................... c ? 1 c.1.1.3 startup time......................................................................................... c ? 1 c.1.1.4 frequency shift due to temperature effect on the circuit .................. c ? 2 c.1.1.5 parasitic capacitance off-chip between txtal and textal......................................................................................... c ? 2 c.1.1.6 parasitic capacitance off-chip between txtal or textal and vss ............................................................................ c ? 2 c.1.1.7 parasitic resistance between txtal and textal............................ c ? 2 c.1.1.8 parasitic resistance between txtal or textal and vss ............................................................................................... c ? 2 c.1.2 quartz crystal specification ......................................................................... c ? 3 d in t e r nal te s t . . ...... . ..... . ...... . ..... . ...... . ..... . ...... . ..... . ..... . ...... . ..... . ...... . ..... . ...... . ..... . ...... . ..... . . d ? 1 d.1 t e s t u n i t contr o l r e g i s t e r (tucr ) . . ..... . ..... . ...... . ..... . ...... . ..... . ...... . ..... . ...... . ..... . . d ? 1 figures 1-1 sa-1110 features .............................................................................................1 ? 1 1-2 sa-1110 example system ................................................................................1 ? 5 2-1 sa-1110 block diagram ....................................................................................2 ? 2 2-2 sa-1110 functional diagram ............................................................................2 ? 3 2-3 sa-1110 memory map ......................................................................................2 ? 9 5-1 format of internal coprocessor instructions mrc and mcr............................5 ? 1 8-1 sa-1110 clock system block diagram .............................................................8 ? 1 9-1 general-purpose i/o block diagram.................................................................9 ? 2 9-2 interrupt controller block diagram .................................................................. 9 ? 11 9-3 transitions between modes of operation ....................................................... 9 ? 32 10-1 general memory interface configuration ........................................................ 10 ? 1 10-2 dram system example.................................................................................. 10 ? 4 10-3 sdram system example ............................................................................... 10 ? 5 10-4 smrom system example............................................................................... 10 ? 6 10-5 dram single-beat transactions................................................................... 10 ? 32 10-6 dram burst-of-eight transactions ................................................................. 10 ? 33 10-7 sdram state machine ................................................................................. 10 ? 36 10-8 sdram 1-beat read/write/read timing for 4 bank x 4 m x 4 bit organization (64 mbit)...................................................................................10 ? 37 10-9 sdram 1-beat read/write timing for 4 bank x 4 m x 4 bit organization (64 mbit) at half-memory clock frequency (mdrefr:kndb2=1)) .............. 10 ? 38
xvi sa-1110 developer ? s manual 10-10 sdram 8-beat read/write timing for 4 bank x 4 m x 4 bit organization (64 mbit)................................................................................... 10 ? 39 10-11 dram/sdram cbr refresh cycle ............................................................. 10 ? 41 10-12 burst-of-eight rom or flash read timing diagram..................................... 10 ? 43 10-13 eight-beat burst read from burst-of-four rom or flash............................. 10 ? 44 10-14 nonburst rom, sram, or flash read timing diagram ? four data beats) 10 ? 45 10-15 sram write timing diagram (4 ? beat burst)................................................ 10 ? 47 10-16 variable latency i/o read timing (burst-of-four, with one wait cycle per beat) ............................................................................................. 10 ? 49 10-17 variable latency i/o write timing (burst-of-four, with one wait cycle per beat) ............................................................................................. 10 ? 50 10-18 flash write timing diagram (2 writes) ......................................................... 10 ? 51 10-19 smrom state machine ................................................................................ 10 ? 54 10-20 smrom eight-beat and two-beat timing for 2 m x 16 bit organization (32 mbit) at half-memory clock frequency (mdrefr:k0db2=1) ............... 10 ? 55 10-21 pcmcia memory map .................................................................................. 10 ? 56 10-22 pcmcia external logic for a two-socket configuration.............................. 10 ? 59 10-23 pcmcia external logic for a one-socket configuration.............................. 10 ? 60 10-24 pcmcia memory or i/o 16-bit access ......................................................... 10 ? 61 10-25 pcmcia i/o 16-bit access to 8-bit device ................................................... 10 ? 62 11-1 peripheral control module block diagram ...................................................... 11 ? 2 11-2 big and little endian dma transfers .............................................................. 11 ? 8 11-3 palette buffer format .................................................................................... 11 ? 18 11-4 4 bits per pixel data memory organization (little endian)........................... 11 ? 19 11-5 8-bits per pixel data memory organization (little endian) .......................... 11 ? 20 11-6 12-bits per pixel data memory organization (passive mode only) ............. 11 ? 20 11-7 16-bits per pixel data memory organization (active mode only) ................ 11 ? 20 11-8 lcd data-pin pixel ordering ........................................................................ 11 ? 27 11-9 frame buffer/palette bits output to lcd data pins in active mode............. 11 ? 29 11-10 passive mode beginning-of-frame timing ................................................... 11 ? 50 11-11 passive mode end-of-frame timing............................................................. 11 ? 51 11-12 passive mode pixel clock and data pin timing ........................................... 11 ? 52 11-13 active mode timing....................................................................................... 11 ? 53 11-14 active mode pixel clock and data pin timing .............................................. 11 ? 54 11-15 connecting the usb to the sa-1110 ............................................................ 11 ? 57 11-16 nrzi bit encoding example.......................................................................... 11 ? 58 11-17 in, out, and setup token packet format................................................. 11 ? 60 11-18 sof token packet format ........................................................................... 11 ? 60 11-19 data packet format ...................................................................................... 11 ? 60 11-20 handshake packet format............................................................................ 11 ? 60 11-21 bulk transaction formats ............................................................................. 11 ? 61 11-22 control transaction formats......................................................................... 11 ? 62 11-23 hp-sir* modulation example ....................................................................... 11 ? 85 11-24 uart frame format for irda transmission (<= 115.2 kbps) ...................... 11 ? 86 11-25 4ppm modulation encodings ........................................................................ 11 ? 86 11-26 4ppm modulation example........................................................................... 11 ? 87 11-27 high-speed serial frame format for irda transmission (4.0 mbps) ........... 11 ? 87 11-28 example uart data frame ....................................................................... 11 ? 109 11-29 mcp frame data format............................................................................ 11 ? 128 11-30 mcp frame pin timing............................................................................... 11 ? 128
sa-1110 developer ? s manual xvii 11-31 mpc/codec sampling counter synchronization.........................................11 ? 129 11-32 audio/telecom transmit/receive fifo data format .................................11 ? 131 11-33 texas instruments* synchronous serial frame format .............................11 ? 152 11-34 motorola* spi frame format ......................................................................11 ? 153 11-35 national microwire* frame format..............................................................11 ? 154 11-36 transmit/receive fifo data format ..........................................................11 ? 155 11-37 motorola* spi frame formats for spo and sph programming.................11 ? 161 13-1 memory bus ac timing definitions.................................................................13 ? 2 13-2 lcd ac timing definitions..............................................................................13 ? 3 13-3 mcp ac timing definitions............................................................................. 13 ? 3 14-1 sa-1110 256-pin mbga mechanical drawing ................................................ 14 ? 2 16-1 test access port (tap) controller state transitions ...................................... 16 ? 1 16-2 boundary-scan block diagram ....................................................................... 16 ? 5 16-3 boundary-scan general timing ...................................................................... 16 ? 7 16-4 boundary-scan tristate timing....................................................................... 16 ? 8 16-5 boundary-scan reset timing ......................................................................... 16 ? 8 tables 1-1 features of the sa-1110 cpu...........................................................................1 ? 2 1-2 changes to the sa-1110 core from the sa-110 ...............................................1 ? 2 1-3 feature additions to the sa-1110 from the sa-110 ..........................................1 ? 3 1-4 feature additions to the sa-1110 from the sa-1100 ........................................1 ? 3 2-1 signal descriptions (sheet 1 of 4).....................................................................2 ? 4 3-1 vector summary................................................................................................3 ? 4 4-1 instruction timing ..............................................................................................4 ? 1 5-1 cache and mmu control registers (coprocessor 15)......................................5 ? 2 6-1 effects of the cacheable and bufferable bits on the data caches ...................6 ? 3 7-1 valid mmu, dcache, and write buffer combinations........................................7 ? 2 8-1 core clock configurations ................................................................................8 ? 2 9-1 os timer register locations .......................................................................... 9 ? 26 9-2 sa-1110 power and clock supply sources and states during power-down modes ........................................................................................ 9 ? 33 9-3 pin state during sleep ................................................................................... 9 ? 34 9-4 power manager register locations ................................................................ 9 ? 41 9-5 reset controller register locations................................................................ 9 ? 44 10-1 sa-1110 transactions.....................................................................................10 ? 8 10-2 memory interface control registers................................................................ 10 ? 9 10-3 timing interpretations of possible sdram/smrom mdcas settings ........ 10 ? 20 10-4 bs_xx bit encoding....................................................................................... 10 ? 24 10-5 bclk speeds for 160-mhz processor core frequency ...............................10 ? 24 10-6 some dram memory size options .............................................................. 10 ? 29 10-7 dram or smrom row/column address multiplexing ................................. 10 ? 30 10-8 sdram command encoding........................................................................ 10 ? 34 10-9 summary of static memory and variable latency i/o capabilities............... 10 ? 42 10-10 smrom command encoding ....................................................................... 10 ? 52 11-1 peripheral control modules ? register width and dma port size....................11 ? 2 11-2 peripheral unit base addresses ..................................................................... 11 ? 3 11-3 peripheral unit interrupt numbers................................................................... 11 ? 3 11-4 dedicated peripheral pins............................................................................... 11 ? 4
xviii sa-1110 developer ? s manual 11-5 peripheral unit gpio pin assignment ............................................................ 11 ? 5 11-6 valid settings for the ddarn register ........................................................... 11 ? 9 11-7 color/gray-scale intensities and modulation rates ..................................... 11 ? 23 11-8 lcd controller data pin utilization ............................................................. 11 ? 26 11-9 lcd controller control, dma, and status register locations ...................... 11 ? 49 11-10 usb bus states ............................................................................................ 11 ? 56 11-11 endpoint field addressing ............................................................................ 11 ? 59 11-12 host device request summary .................................................................... 11 ? 62 11-13 udc control, data, and status register locations ...................................... 11 ? 78 11-14 uart control, data, and status register locations .................................... 11 ? 83 11-15 gpclk control register locations............................................................... 11 ? 84 11-16 uart control, data, and status register locations .................................. 11 ? 108 11-17 hssp control, data, and status register locations .................................. 11 ? 108 11-18 serial port 3 control, data, and status register locations ........................ 11 ? 126 11-19 mcp control, data, and status register locations .................................... 11 ? 166 11-20 ssp control, data, and status register locations..................................... 11 ? 167 11-21 ppc control and flag register locations .................................................. 11 ? 177 12-1 sa-1110 dc maximum ratings ...................................................................... 12 ? 1 12-2 sa-1110 dc operating conditions ................................................................. 12 ? 2 2-3 sa-1110 power supply voltages and currents .............................................. 12 ? 3 13-1 sa-1110 output derating ? fast output buffer............................................. 13 ? 1 13-2 sa-1110 output derating ? slow output buffer ............................................ 13 ? 1 13-3 sa-1110 ac timing specifications and guidelines for sdram/smrom ...... 13 ? 4 13-4 sa-1110 ac timing guidelines for asynchronous memory types................. 13 ? 5 13-5 sa-1110 ac timing table: mcp interface and lcd controller ..................... 13 ? 5 14-1 sa-1110 pinout ? numeric signal pin list...................................................... 14 ? 3 14-2 sa-1110 pinout ? alphabetic signal pin list .................................................. 14 ? 4 16-1 sa-1110 boundary-scan interface timing...................................................... 16 ? 9 16-2 boundary-scan signals and pins (sheet 1 of 4)........................................... 16 ? 10
sa-1110 developer ? s manual 1-1 introduction 1 1.1 intel ? strongarm sa-1110 microprocessor the intel ? strongarm* sa-1110 microprocessor (sa-1110) is a highly integrated communications microcontroller that incorporates a 32-bit strongarm risc processor core, system support logic, multiple communication channels, an lcd controller, a memory and pcmcia controller, and general-purpose i/o ports.as do the intel ? strongarm sa-110 microprocessor (sa-110) and intel ? strongarm sa-1100 microprocessor (sa-1100), earlier members of the strongarm family, the sa-1110 provides power efficiency, low cost, and high performance. figure 1-1 shows the features of the sa-1110. the shaded boxes are features that have carried over with few or no changes from the sa-110. the nonshaded boxes are new or updated features for the sa-1110; most of the features are equivalent to that of the sa-1100. the sa-1110 differs from the sa-1100 only in the features of its memory and pcmcia controller. figure 1-1. sa-1110 features * other brands and names are the property of their respective owners. a6830-01 read buffer immu dmmu memory/ controller lcd controller interrupt controller dma controller interval timer write buffer 16kb instruction cache 8kb data cache serial controllers real-time clock general-purpose i/o 512-byte minidcache jtag intel ? strongarm * cpu * other brands and names are the property of their respective owners.
1-2 sa-1110 developer ? s manual introduction table 1-1. features of the sa-1110 cpu  high performance ? 150 dhrystone 2.1 mips @ 133 mhz ? 235 dhrystone 2.1 mips @ 206 mhz  low power (normal mode) ? ? <240 mw @1.55 v/133 mhz ? <400 mw @ 1.75 v/206 mhz  integrated clock generation ? internal phase-locked loop (pll) ? 3.686 mhz oscillator ? 32.768 khz oscillator  power-management features ? normal (full-on) mode ? idle (power-down) mode ? sleep (power-down) mode  big and little endian operating modes  3.3 v i/o interface  256-pin mini-bga package (mbga)  32-way set-associative caches ? 16 kbyte instruction cache ? 8 kbyte write-back data cache  32-entry memory-management units ? maps 4 kbyte, 8 kbyte, or 1 mbyte  write buffer ? 8-entry, between 1 and 16 bytes each  read buffer ? 4-entry, 1, 4, or 8 words  memory bus ? interfaces to rom, synchronous mask rom (smrom), flash, sram, sram-like variable latency i/o, dram, and synchronous dram (sdram) ? supports two pcmcia sockets ? power dissipation, particularly in idle mode, is strongly dependent on the details of the system design. table 1-2. changes to the sa-1110 core from the sa-110  data cache reduced from 16 kbyte to 8 kbyte  interrupt vector address adjust capability  read buffer (nonblocking)  minicache for alternate data caching  hardware breakpoints  memory-management unit (mmu) enhancements  process id mapping
sa-1110 developer ? s manual 1-3 introduction table 1-3. feature additions to the sa-1110 from the sa-110  memory controller supporting rom, synchronous mask rom (smrom), flash, dram, synchronous dram (sdram), sram, and sram-like variable latency i/o  lcd controller ? 1-, 2-, or 4-bit gray-scale levels ? 8-, 12-, or 16-bit color levels  230-kbps uart  touch-screen, audio, telecom port  infrared data (irda) serial port ? 115 kbps, 4 mbps  six-channel dma controller  integrated two-slot pcmcia controller  twenty-eight general-purpose i/o ports  real-time clock with interrupt capability  on-chip oscillators for clock sources  interrupt controller  power-management features ? normal (full-on) mode ? idle (power-down) mode ? sleep (power-down) mode  four general-purpose interruptible timers  12-mbps usb device controller  synchronous serial port (ucb1100, ucb1200, spi, ti, wire) table 1-4. feature additions to the sa-1110 from the sa-1100  synchronous dram (sdram) support  synchronous mask rom (smrom) support (32-bit only) on cs0-3  ready input signal for variable latency i/o devices (for example, graphics chips)  cs4 and cs5 for variable latency i/o devices, rom, or flash memory  cs3 support for variable latency i/o devices (instead of sram)  support for burst (page-mode) read timings from flash memory  support for 16-bit data busses on all memory types (except smrom)  support for sram, dram, and sdram in the same system
1-4 sa-1110 developer ? s manual introduction 1.2 overview the sa-1110 is a general-purpose, 32-bit risc microprocessor with a 16 kbyte instruction cache, an 8 kbyte write-back data cache, a minicache, a write buffer, a read buffer, and a memory management unit (mmu) combined in a single chip. the sa-1110 is software compatible with the arm * v4 architecture processor family and can be used with arm * support chips such as i/o, memory, and video. the core of the sa-1110 is derived from the core of the intel ? strongarm sa-110 microprocessor (sa-110), with the following changes:  reduction in size of the data cache from 16 kbyte to 8 kbyte  addition of a 512-byte mini data cache that allocates data based on mmu settings  addition of debug support in the form of address and data breakpoints  addition of a four-entry read buffer to facilitate software-controlled data prefetching  addition of vector address adjust capability  addition of a process id register the logic outside the core and caches is grouped into the following three modules:  memory and pcmcia control module (mpcm) ? memory interface supporting rom, synchronous mask rom (smrom), flash, dram, sdram, sram, sram-like variable latency i/o, and pcmcia control signals  system control module (scm) ? twenty-eight general-purpose interruptible i/o ports ? real-time clock, watchdog, and interval timers ? power management controller ? interrupt controller ? reset controller ? two on-chip oscillators for connection to 3.686 mhz and 32.768 khz crystals  peripheral control module (pcm) ? six-channel dma controller ? gray/color, active/passive lcd controller ? 16550-compatible uart ? irda serial port (115 kbps, 4 mbps) ? synchronous serial port (ucb1100, ucb1200, spi, ti, wire) ? universal serial bus (usb) device controller the instruction set comprises eight basic instruction types:  two make use of on-chip arithmetic logic unit, barrel shifter, and multiplier to perform high-speed operations on data in a bank of 16 logical registers (31 physical registers), each 32 bits wide.  three classes of instructions control data transfer between memory and the registers: one optimized for flexibility of addressing, one for rapid context switching, and one for swapping data.  two instructions control the flow and privilege level of execution.  one class is used to access the privileged state of the cpu. * other brands and names are the property of their respective owners.
sa-1110 developer ? s manual 1-5 introduction the arm instruction set is a good target for compilers of many different high-level languages. where required for critical code segments, assembly code programming is also straightforward, unlike some risc processors that need sophisticated compiler technology to manage complicated instruction interdependencies. the sa-1110 is a static part and has been designed to run at a reduced voltage to minimize its power requirements. this makes it a good choice for portable applications where both of these features are essential. 1.3 example system figure 1-2 shows how the sa-1110 can be used in a hand held computing device. figure 1-2. sa-1110 example system a6701-01 32.768 khz 3.686 mhz intel ? strongarm * sa-1110 portable communications microcontroller uart communications tablet / serial keyboard infrared communications usb synchronization port codec sdram/dram variable latency i/o smrom/ rom flash sram glue logic pcmcia interface (flash, modem) gray scale or color lcd display * other brands and names are the property of their respective owners.
1-6 sa-1110 developer ? s manual introduction 1.4 arm architecture the sa-1110 implements the arm* v4 architecture as defined in the arm architecture reference , 28-july-1995, with the following options: 1.4.1 26-bit mode the sa-1110 supports 26-bit mode but all exceptions are initiated in 32-bit mode. the p and d bits do not affect the operation of sa-1110; they are always read as ones and writes to them are ignored. 1.4.2 coprocessors the sa-1110 supports mcr and mrc access to coprocessor number 15. these instructions are used to access the memory-management, configuration, and cache control registers. in addition, coprocessor 15 provides control for read buffer fills and flushes, and hardware breakpoints. all other coprocessor instructions cause an undefined instruction exception. no support for external coprocessors is provided. 1.4.3 memory management memory management exceptions preserve the base address registers so that no code is required to restore state. separate translation lookaside buffers (tlbs) are implemented for the instruction and data streams. each tlb has 32 entries that can each map a segment, a large page, or a small page. the tlb replacement algorithm is round robin. the data tlbs support both the flush-all and flush-single-entry operations, while the instruction tlbs support only the flush-all operation. 1.4.4 instruction cache the sa-1110 has a 16 kbyte instruction cache (icache) with 32-byte blocks and 32-way associativity. the cache supports the flush-all function. replacement is round robin within a set. the icache can be enabled while memory management is disabled. when memory management is disabled, all memory is considered cacheable by the icache. 1.4.5 data cache the sa-1110 has an 8 kbyte data cache (dcache) with 32-byte blocks and 32-way associativity. the cache supports the flush-all, flush-entry, and copyback-entry functions. the copyback-all function is not supported in hardware. this function can be provided by software. the cache is read allocate with round-robin replacement. the dcache has been augmented with a 16-entry, two-way set associative minicache that allocates when the mmu b and c bits are 0 and 1, respectively. this cache is accessed in parallel with the main dcache. replacement victims in this cache are replaced based on a least-recently-used (lru) algorithm. this cache is useful for applications that access large data structures and would normally thrash the main dcache. instead, these data structures can be mapped so that they allocate into the minicache and only replace data from the same structure. * other brands and names are the property of their respective owners.
sa-1110 developer ? s manual 1-7 introduction 1.4.6 write buffer the sa-1110 has an eight-entry write buffer with each entry able to contain 1 to 16 bytes. a drain write buffer operation is supported. 1.4.7 read buffer the sa-1110 has a four-entry read buffer capable of loading 1, 4, or 8 words of data per entry. this facility permits software to preload data into the buffer for use at a later time without blocking the operation of the processor. software can flush either a single entry or the entire buffer (four entries). the read buffer is controlled through system control coprocessor 15 and can be enabled for use in user mode.

sa-1110 developer ? s manual 2-1 functional description 2 this chapter provides a functional description of the intel ? strongarm * sa-1110 microprocessor (sa-1110). it describes the basic building blocks within the processor, lists and describes the pins, and explains the memory map. 2.1 block diagram the sa-1110 consists of the following functional blocks: ? processing core the processor is the arm * sa-1 core with a 16 kbyte instruction cache (icache) and 8 kbyte data cache (dcache). the instruction (i) and data (d) streams are translated through independent memory-management units (mmus). stores are made using a four-line write buffer. the performance of specialized load routines is enhanced with the four-entry read buffer that can be used to prefetch data for use at a later time. a 16-entry minicache provides a smaller and logically separate data cache that can be used to enhance caching performance when dealing with large data structures.  memory and pcmcia control module the memory and pcmcia control module (mpcm) supports four banks of fast-page-mode (fpm), extended-data-out (edo), and/or synchronous dram (sdram). it also supports up to six banks of static memory: all six banks allow rom or flash memory, each with non-burst or burst read timings. additionally, the lower three static banks support sram, the upper three static banks support variable latency i/o devices (with the variable data latency controlled by a shared data ready input), and the lower four static banks support synchronous mask rom (smrom). smrom is supported only on 32-bit data busses. all other dynamic and static memory types and variable latency i/o devices are supported on either 16-bit or 32-bit data busses. expansion devices are supported through pcmcia control signals that share the memory bus data and address lines to complete the card interface. some external glue logic (buffers and transceivers) is necessary to implement the interface. control is provided to permit two card slots with hot-swap capability.  peripheral control module the peripheral control module (pcm) contains a number of serial control devices, an lcd controller as well as a six-channel dma controller to provide service to these devices: ? an lcd controller with support for passive or active displays ? a universal serial bus (usb) endpoint controller ? a serial controller with supporting 115 kbps and 4 mbps irda protocols ? a 16550-like uart supporting 230 kbps ? a codec interface supporting motorola spi, national microwire, ti synchronous serial, or the phillips ucb1100 and ucb1200 protocol * other brands and names are the property of their respective owners.
2-2 sa-1110 developer ? s manual functional description  system control module the system control module (scm) is also connected to the peripheral bus. it contains five blocks used for general system functions: ? a real-time clock (rtc) clocked from an independent 32.768 khz oscillator ? an operating system timer (ost) for general system timer functions as well as a watchdog mode ? twenty-eight general-purpose i/os (gpio) ? an interrupt controller ? a power-management controller that handles the transitions in and out of sleep and idle modes ? a reset controller that handles the various reset sources on the processor figure 2-1 shows the functional blocks contained in the sa-1110 integrated processor. figure 2-2 is a functional diagram of the sa-1110. figure 2-1. sa-1110 block diagram a6608-01 serial channel 0 udc serial channel 2 irda serial channel 3 uart serial channel 1 gpclk/uart bridge dma controller jtag and misc test read buffer write buffer lcd controller intel ? strongarm * sa-1110 microprocessor immu dmmu 32.768 khz 3.686 mhz osc osc pll2 pll1 icache (16 kbytes) dcache (8 kbytes) peripheral bus system bus load/store data rtc minicache pc instructions addr memory and pcmcia control module arm * sa-1 core os timer general- purpose i/o interrupt controller power management reset controller serial channel 4 codec * other brands and names are the property of their respective owners.
sa-1110 developer ? s manual 2-3 functional description 2.2 inputs/outputs figure 2-2. sa-1110 functional diagram a6610-01 intel ? strongarm * sa-1110 [256-pins] l_dd(7:0) l_fclk l_lclk l_pclk l_bias gp(27:0) txd _2 rxd _2 txd_1 rxd _1 udc+ udc- ncas/dqm(3:0) nras/nsdcs(3:0) noe nwe ncs(5:0) rdy nsdras nsdcas sdcke<1:0> sdclk<2:0> rd/nwr npoe npwe npior npiow npce<2:1> psktsel npreg npwait niois16 supply data bus vdd vddx vss/vssx pcmcia bus signals tck_byp testclk pextal pxtal textal txtal nreset nreset_out smrom_en rom_sel clocks, reset and test memory control transceiver control address bus serial channel 0 (usb) serial channel 1 serial channel 2 (irda) txd _3 rxd _3 serial channel 3 (uart) rxd _c txd _c sfrm _c sclk _c serial channel 4 (codec) tdi tck tms ntrst tdo jtag batt_fault pwr_en vdd_fault power management gpio ports lcd control d<31:0> a<25:0> * other brands and names are the property of their respective owners.
2-4 sa-1110 developer ? s manual functional description 2.3 signal description the following table describes the signals. key to signal types: n ? active low signal ic ? input, cmos threshold icocz ? input, cmos threshold, output cmos levels, tristatable ocz ? output, cmos levels, tristatable table 2-1. signal descriptions (sheet 1 of 4) name type description a 25:0 ocz memory address bus. this bus signals the address requested for memory accesses. bits 24..10 carry the 15-bit dram address. the static memory devices and the expansion bus receive address bits 25..0. d 31:0 icocz memory data bus. bits 15..0 are used for 16-bit data busses. ncs 5:0 ocz static chip selects. these signals are chip selects to static memory devices such as rom and flash. they are individually programmable in the memory configuration registers. bits 5..3 can be used with variable latency i/o devices. rdy ic static data ready signal for ncs 5:3. this signal should be connected to the data ready output pins of variable latency i/o devices that require variable data latencies. devices selected by ncs 5:3 can share the rdy pin if they drive it high prior to tristating and a weak external pull-up is present. noe ocz memory output enable. this signal should be connected to the output enables of memory devices to control their data bus drivers. nwe ocz memory write enable. this signal should be connected to the write enables of memory devices.this signal is used in conjunction with ncas 3:0 to perform byte writes. nras 3:0/ nsdcs 3:0 ocz dram ras or sdram cs for banks 0 through 3. these signals should be connected to the row address strobe (ras) pins for asynchronous dram or the chip select (cs) pins for sdram. ncas 3:0/ dqm 3:0 ocz dram cas or sdram dqm for data banks 0 through 3. these signals should be connected to the column address strobe (cas) pins for asynchronous dram or the data output mask enables (dqm) for sdram. nsdras ocz sdram ras. this signal should be connected to the row address strobe (ras) pins for all banks of sdram. nsdcas ocz sdram cas. this signal should be connected to the column address strobe (cas) pins for all banks of sdram. sdcke 1:0 ocz sdram and/or smrom clock enables. sdcke 0 should be connected to the clock enable (cke) pins of smrom. sdcke 0 is asserted upon any rest (including sleep-exit) if static memory bank 0 (boot space) is configured for synchronous mask rom (smrom_en = 1); otherwise it is deasserted upon reset. sdcke 1 should be connected to the clock enable pins of sdram.they are deasserted (held low) during sleep. sdcke 1 always is deasserted upon reset. the memory controller provides control register bits for deassertion of each sdcke pin. however, sdcke 0 cannot be deasserted via program if smrom_en =1.
sa-1110 developer ? s manual 2-5 functional description sdclk 2:0 ocz sdram and/or smrom clock. sdclk 0 should be connected to the clock (clk) pins of smrom. sdclk 1 and sdclk 2 should be connected to the clock pins of sdram in bank pairs 0/1 and 2/3, respectively. they are driven by either the internal memory controller clock (cpu clock divided by 2) or the memory controller clock divided by 2 (cpu clock divided by 4). all sdclk pins are held low during sleep mode and start running at cpu clock divide by 4 upon any reset (including sleep-exit). the memory controller provides control register bits for clock division and disable of each sdclk pin. however, sdclk 0 cannot be disabled via program if static memory bank 0 (boot space) is configured for synchronous mask rom (smrom_en = 1). rd/nwr ocz read/write direction control for memory and pcmcia data bus (d 31:0). this signal is applicable to all memory bus and pcmcia transfers. for reads (rd/nwr = 1), system-level bus transceivers or directly connected memory devices should drive d 31:0. for writes (rd/nwr = 0), the sa-1110 will drive d 31:0. npoe ocz pcmcia output enable. this signal is an output and is used to perform reads from memory and attribute space. npwe ocz pcmcia write enable. this signal is an output and is used to perform writes to memory and attribute space. npiow ocz pcmcia i/o write. this signal is an output and is used to perform write transactions to the pcmcia i/o space. npior ocz pcmcia i/o read. this signal is an output and is used to perform read transactions from the pcmcia i/o space. npce 2:1 ocz pcmcia card enable. these signals are output and are used to select a pcmcia card. npce 2 enables the high-byte lane and npce 1 enables the low-byte lane. niois16 ic i/o select 16. this signal is an input and is an acknowledgment from the pcmcia card that it can perform 16-bit i/o data transfers. npwait ic pcmcia wait. this signal is an input and is driven low by the pcmcia card to extend the duration of transfers to/from the sa-1110. psktsel ocz pcmcia socket select. this signal is an output and is used by external steering logic to route control, address, and data signals to one of the pcmcia sockets. when psktsel is low, socket zero is selected. when psktsel is high, socket one is selected. this signal has the same timing as the address lines. npreg ocz pcmcia register select. this signal is an output and indicates that, on a memory transaction, the target address is attribute space. this signal has the same timing as address. l_dd 7:0 ocz lcd controller display data. l_fclk ocz lcd frame clock. l_lclk ocz lcd line clock. l_pclk ocz lcd pixel clock. l_bias ocz lcd ac bias drive. txd_c ocz codec transmit. rxd_c ic codec receive. table 2-1. signal descriptions (sheet 2 of 4) name type description
2-6 sa-1110 developer ? s manual functional description sclk_c ocz codec clock. sfrm_c ocz codec frame signal. udc+ icocz serial port zero bidirectional, differential signalling pin (udc). udc- icocz serial port zero bidirectional, differential signalling pin (udc). txd_1 ocz serial port one transmit pin (uart). rxd_1 ic serial port one receive pin (uart). txd_2 ocz serial port two transmit pin (irda). rxd_2 ic serial port two receive pin (irda). txd_3 ocz serial port three transmit pin (uart). rxd_3 ic serial port three receive pin (uart). gp 27:0 icocz general-purpose input output. smrom_en ic synchronous mask rom (smrom) enable. this pin is used to determine if the boot rom (static memory bank 0) is asynchronous or synchronous. if asynchronous, boot rom is selected (smrom_en = 0) and its width is determined by the state of the rom_sel pin. smrom is supported only on 32-bit data busses. rom_sel ic rom select. this pin is used to configure the rom width. it is either grounded or pulled high. if rom_sel is grounded, the rom width is 16 bits. if rom_sel is pulled up, the rom width is 32 bits. pxtal ic input connection for 3.686-mhz crystal (non-cmos threshold). pextal ocz output connection for 3.686-mhz crystal (non-cmos level). txtal ic input connection for 32.768-khz crystal (non-cmos threshold). textal ocz output connection for 32.768-khz crystal (non-cmos level). pwr_en ocz power enable. active high. pwr_en enables the external vdd power supply. deasserting it signals the power supply that the system is going into sleep mode and that the vdd power supply should be removed. batt_fault ic battery fault. signals the sa-1110 that the main power source is going away (battery is low or has been removed from the system). the assertion of batt_fault causes the sa-1110 to enter sleep mode. the sa-1110 will not recognize a wake-up event while this signal is asserted. vdd_fault ic vdd fault. signals the sa-1110 that the main power supply is going out of regulation (shorted card is inserted). vdd_fault will cause the sa-1110 to enter sleep mode. vdd_fault is ignored after a wake-up event until the power supply timer completes (approximately 10 ms). nreset ic hard reset. this active low signal is a level-sensitive input used to start the processor from a known address. a low level will cause the current instruction to terminate abnormally, and the on-chip caches, mmu, and write buffer to be disabled. when nreset is driven high, the processor will restart from address 0. nreset must remain low until the power supply is stable and the internal 3.686-mhz oscillator has come up to speed. while nreset is low, the processor will perform idle cycles. nreset_out ocz reset out. this signal is asserted when nreset is asserted and deasserts when the processor has completed resetting. nreset_out is also asserted for "soft" reset events (sleep and watchdog). ntrst ic test interface reset. note this pin has an internal pull-down resistor and must be driven high to enable the jtag circuitry. if left unconnected, this pin is pulled low and disables jtag operation. table 2-1. signal descriptions (sheet 3 of 4) name type description
sa-1110 developer ? s manual 2-7 functional description tdi ic jtag test interface data input. note this pin has an internal pull-up resistor. tdo ocz jtag test interface data output. note this pin does not have an internal pull-up resistor. tms ic jtag test interface mode select. note this pin has an internal pull-up resistor. tck ic jtag test interface reference clock. this times all the transfers on the jtag test interface. note this pin has an internal pull-down resistor. tck_byp ic test clock pll bypass. when tck_byp is high, the testclk is used as the core clock in place of the pll clock; when low, the internal pll output is used. this signal has no relation to the jtag tck pin. testclk ic test clock. testclk is used to provide the core clock when tck_byp is high. it should be tied low if tck_byp is low. this pin should be used for test purposes only. an end user should ground this pin. vdd ? positive supply for the core. nine pins are allocated to this supply; eight pins are labeled vdd. the ninth pin, labeled vddp is dedicated to the pll supply and should have its own dedicated decoupling capacitor. also, it should be tied directly to the vdd power plane with the other eight vdd pins. vddx ? positive supply for the pins. see chapter 14 for a count of vddx pins. all of the pins allocated to vddx (labeled vddx1, vddx2, and vddx3) should be tied directly to the vddx power plane. vddx3 should have its own dedicated decoupling capacitor. vss ? ground supply. nine pins are allocated to vss, including one for the pll. vssx ? ground supply for the i/o pins. see chapter 14, ? package and pinout, ? for a count of vssx pins. table 2-1. signal descriptions (sheet 4 of 4) name type description
2-8 sa-1110 developer ? s manual functional description 2.4 memory map figure 2-3 shows the sa-1110 memory map. the map is divided into four main partitions of 1 gbyte each.  physical address: 0h0000 0000 to 0h3fff ffff. this partition is dedicated to static memory devices (rom, sram, and flash) and to the pcmcia expansion bus area. this space is divided into: ? four 128 mbyte blocks for static memory devices the static memory space is intended for rom, sram, and flash memory. the bottom partition (at 0h0000 0000) is assumed to be rom at boot time. the smrom_en pin is used to determine if the boot rom is asynchronous or synchronous. if asynchronous, boot rom is selected (smrom_en = 0), its width (16-bit or 32-bit) is determined by the state of the rom_sel pin. smrom is supported only on 32-bit data busses. ? two 256 mbyte blocks for the pcmcia interface the pcmcia interface is divided into socket 0 and socket 1 space. these partitions are further subdivided into i/o, memory and attribute space.  physical address: 0h4000 0000 to 0h7fff ffff this partition includes: ? two 128 mbyte blocks for static memory or variable latency i/o devices. this block differs from the other three status memory spaces because it can be used for variable latency i/o but not sram. ? one 768 mbyte block of reserved space. accessing this reserved space results in a data abort exception.  physical address: 0h8000 0000 to 0hbfff ffff this partition contains all on-chip registers (except those specified by the arm v4 architecture). this block is further divided into four 256 mbyte blocks that contain control registers for the following major functional blocks within the processor: ? peripheral control module registers ? system control module registers ? memory and expansion registers ? lcd and dma registers  physical address: 0hc000 0000 to 0hffff ffff this partition contains dram memory and is divided into: ? four banks of dram fixed at 128 mbyte each. with multiple banks implemented, there probably will be gaps in the map that should be mapped through the memory-management unit. ? one 128 mbyte block that is mapped within the memory controller and returns zeros when read. this function is intended to facilitate rapid cache flushing by not requiring an external memory access to load data into the cache. this space is burstable. writes to this space have no effect. ? one 384 mbyte block of reserved space. accessing this reserved space results in a data abort exception.
sa-1110 developer ? s manual 2-9 functional description figure 2-3. sa-1110 memory map a6611-01 dynamic memory interface 512 mbytes internal registers 1 gbyte 0hc000 0000 0h8000 0000 0h4000 0000 0h5000 0000 0h2000 0000 0h0000 0000 static memory or variable latency i/o interface 256 mbytes pcmcia interface 512 mbytes static memory interface (rom, flash, sram) 512 mbytes cache flush replacement data. reads return zero 128 mbytes reserved (384 mbytes) zeros bank (128 mbytes) dram bank 3 (128 mbytes) reserved (768 mbytes) dram bank 2 (128 mbytes) dram bank 1 (128 mbytes) dram bank 0 (128 mbytes) static bank select 3 (128 mbytes) static bank select 2 (128 mbytes) static bank select 1 (128 mbytes) static bank select 0 (128 mbytes) static bank select 5 (128 mbytes) static bank select 4 (128 mbytes) lcd and dma registers (256 mbytes) memory and expansion registers (256 mbytes) system control module registers (256 mbytes) peripheral control module registers (256 mbytes) pcmcia socket 1 space (256 mbytes) pcmcia socket 0 space (256 mbytes)

sa-1110 developer ? s manual 3-1 arm implementation options 3 the following sections describe arm * architecture options that are implemented by the intel ? strongarm * sa-1110 microprocessor (sa-1110). 3.1 big and little endian the big endian bit in the control register sets whether the sa-1110 treats words stored in memory as being stored in big endian or little endian format. memory is viewed as a linear collection of bytes numbered upwards from 0. bytes 0 to 3 hold the first stored word, bytes 4 to 7 hold the second, and so on. in the little endian scheme, the lowest numbered byte in a word is considered to be the least significant byte of the word and the highest numbered byte is the most significant. byte 0 of the memory system should be connected to data lines 7 through 0 (d 7:0) in this scheme. in the big endian scheme, the most significant byte of a word is stored at the lowest numbered byte and the least significant byte is stored at the highest numbered byte. therefore, byte 0 of the memory system should be connected to data lines 31 through 24 (d 31:24). the state of the big endian bit changes the location of the bytes only within a 32-bit word. the accessed bytes are changed for the load byte, store byte, load halfword, and store halfword instructions only. instruction fetches and word load and stores are not changed by the state of the big endian bit, except when those accesses are performed with memory on 16-bit busses. see chapter 10, ? memory and pcmcia control module ? for details on configuring data bus widths for various memory types. these conventions are identical to those of the sa-110. in addition, the sa-1110 dma controller is programmable by channel as to the endian format of the transfer. for dma transfers, all memory accesses are words. then the data is buffered and transferred to/from the device as halfwords or bytes. when the words are assembled or disassembled, the endian format of the channel is observed. for details on how dma data is transferred relative to the endian format of the channel, see the section 11.6, ? dma controller ? on page 11-6 in chapter 11, ? peripheral control module ? . 3.2 exceptions exceptions arise whenever there is a need for the normal flow of program execution to be broken; for example, so that the processor can be diverted to handle an interrupt from a peripheral. the processor state just prior to handling the exception must be preserved so that the original program resumes when the exception routine has completed. many exceptions may arise at the same time. the sa-1110 handles exceptions by making use of banked registers to save state. the contents of pc and cpsr are copied into the appropriate r14 and spsr, and the pc and mode bits in the cpsr bits are forced to a value that depends on the exception. * other brands and names are the property of their respective owners. interrupt disable flags are set where required to prevent otherwise unmanageable nestings of exceptions. in the case of a reentrant interrupt handler, r14 and the spsr should be saved onto a stack in main memory before reenabling the interrupt; when transferring the spsr register to and
3-2 sa-1110 developer ? s manual arm implementation options from a stack, it is important to transfer the whole 32-bit value, and not just the flag or control fields. when multiple exceptions arise simultaneously, a fixed priority determines the order in which they are handled. the priorities are listed later in this chapter. most exceptions are fully defined in the arm architectural reference . the following sections specify the exceptions where the sa-1110 implementation differs from the arm architectural reference . sa-1110 initiates all exceptions in 32-bit mode. when an exception occurs while running in 26-bit mode, the sa-1110 saves only the pc in r14 and the cpsr in the spsr of the exception mode. the 32-bit handler must merge the condition codes, the interrupt enables, and the mode from the spsr into r14 if a handler is to run in 26-bit mode. 3.2.1 power-up reset when the nreset signal is low, sa-1110 stops executing instructions, asserts the nreset_out pin, and then performs idle cycles on the bus. when nreset is high again, sa-1110 does the following: 1. overwrites r14_svc and spsr_svc by copying the current values of the pc and cpsr into them. the values of the saved pc and cpsr are not defined. 2. forces m 4:0 =10011 (32-bit supervisor mode) and sets the i and f bits in the cpsr. 3. forces the pc to fetch the next instruction from address 0x0000 0000. 4. based on the state of the rom_sel pin, fetches this first instruction from either 16-bit (rom_sel low) or 32-bit (rom_sel high) space. the sa-1110 memory controller assembles the data into words in the case of a 16-bit wide rom. at the end of the reset sequence, the mmu, icache, dcache, and write buffer are disabled. alignment faults are also disabled, and little-endian mode is enabled. during power-up, nreset must be negated no earlier than 150 milliseconds after vdd and vddx are stable to allow the internal 3.686-mhz oscillator to stabilize. after the negation of nreset, the pll begins its internally timed locking sequence. note that the assertion of nreset is destructive because the state of the real-time clock and the contents of dram are lost. the sa-1110 has three types of reset. see section 16.2, ? reset ? on page 16-2 in the boundary-scan test interface for details. 3.2.2 rom size select the rom width may be selected using the rom_sel pin. this pin is sampled during the assertion of nreset. the value is stored in the memory controller for use during rom accesses. if this signal is high during reset, then the rom is selected to be 32 bits wide. if it is low during reset, then the rom width is 16 bits. there is no provision for 8-bit roms in the sa-1110.
sa-1110 developer ? s manual 3-3 arm implementation options 3.2.3 abort an abort can be signalled by the internal memory-management unit, through a data breakpoint, or by a reference to reserved memory. an abort indicates that the current memory access cannot be completed or that a prespecified breakpoint address and (optionally) data pattern has been reached. for instance, in a virtual memory system, the data corresponding to the current address may have been moved out of memory onto a disk, and considerable processor activity may be required to recover the data before the access can be performed successfully. the sa-1110 checks for an abort during memory access cycles. when aborted, the sa-1110 responds in one of two ways: 1. if the abort occurred during an instruction prefetch (a prefetch abort ), the prefetched instruction is marked as invalid but the abort exception does not occur immediately. if the instruction is not executed, for example, as a result of a branch being taken while it is in the pipeline, no abort will occur. an abort will take place if the instruction reaches the head of the pipeline and is about to be executed. 2. if the abort occurred during a data access (a data abort ), the action depends on the instruction type. a. single data transfer instructions (ldr, str) will abort with no registers modified. b. the swap instruction (swp) is aborted as though it had not executed, though externally the read access may take place. c. block data transfer instructions (ldm, stm) abort on the first access that cannot complete. if write-back is set, the base is not updated. if the instruction would normally have overwritten the base with data (for example, an ldm instruction with the base in the transfer list), the original value in the base register is restored. when either a prefetch or data abort occurs, the sa-1110 performs the following: 1. saves the address of the aborted instruction plus 4 (for prefetch aborts) or 8 (for data aborts) in r14_abt; saves cpsr in spsr_abt. 2. forces m 4:0 =10111 (abort mode) and sets the i bit in the cpsr. 3. forces the pc to fetch the next instruction from either address 0x0c (prefetch abort) or address 0x10 (data abort). to return after fixing the reason for the abort, use subs pc,r14_abt,#4 (for a prefetch abort) or subs pc,r14_abt,#8 (for a data abort). this will restore both the pc and the cpsr, and retry the aborted instruction. the abort mechanism allows a demand paged virtual memory system to be implemented when suitable memory management software is available. the processor is allowed to generate arbitrary addresses, and when the data at an address is unavailable, the mmu signals an abort. the processor traps into system software, which must work out the cause of the abort, make the requested data available, and retry the aborted instruction. the application program needs no knowledge of the amount of memory available to it, nor is its state in any way affected by the abort.
3-4 sa-1110 developer ? s manual arm implementation options 3.2.4 vector summary table 3-1 lists byte addresses, and they normally contain branch instructions pointing to the relevant routines. these addresses (except the reset vector) can be changed (to 0xffff xxxx) through the vector adjust facility (bit 13, register 1, coprocessor 15). the vector adjust is cleared at reset and cannot modify the reset vector. 3.2.5 exception priorities when multiple exceptions arise at the same time, a fixed priority system determines the order in which they will be handled: 1. reset (highest priority) 2. data abort 3. fiq 4. irq 5. prefetch abort 6. undefined instruction, software interrupt (lowest priority) note that not all exceptions can occur at once. undefined instructions and software interrupts are mutually exclusive because they correspond to particular (nonoverlapping) decodings of the current instruction. if a data abort occurs at the same time as a fiq, and fiqs are enabled (that is, the f flag in the cpsr is clear), the sa-1110 will enter the data abort handler and then immediately proceed to the fiq vector. a normal return from fiq will cause the data abort handler to resume execution. placing data abort at a higher priority than fiq is necessary to ensure that the transfer error does not escape detection; the time for this exception entry should be added to worst-case fiq latency calculations. table 3-1. vector summary address exception mode on entry 0x00000000 reset supervisor 0x00000004 undefined instruction undefined 0x00000008 software interrupt supervisor 0x0000000c abort (prefetch) abort 0x00000010 abort (data) abort 0x00000014 not used ? 0x00000018 irq irq 0x0000001c fiq fiq
sa-1110 developer ? s manual 3-5 arm implementation options 3.2.6 interrupt latencies and enable timing the ability to recognize an irq or fiq interrupt is, in part, determined by the i and f bits of the cpsr. to ensure that a pending interrupt is taken, an interrupt-enabling write to cpsr (msr instruction) must be separated from an interrupt-disabling write to the cpsr by at least two instructions. 3.3 coprocessors the sa-1110 has no external coprocessor bus, so it is not possible to add external coprocessors to this device. the sa-1110 uses the internal coprocessor designated 15 for control of the on-chip mmu, caches, clocks, and breakpoints. coprocessor 15 is also used for read-buffer fills and flushes. if a coprocessor other than 15 is used, then the sa-1110 will take the undefined instruction trap. the coprocessor load, store, and data operation instructions also take the undefined instruction trap. permissions are set so that access to coprocessor 15 is privileged except where protection is programmable with respect to the read buffer operations.

sa-1110 developer ? s manual 4-1 instruction set 4 this section describes the instruction timing for the intel ? strongarm * sa-1110 microprocessor (sa-1110). 4.1 instruction set the sa-1110 implements the arm * v4 architecture as defined in the arm architecture reference, 28-july-1995, with previously noted options and additions. 4.2 instruction timing table 4-1 lists the instruction timing for the sa-1110. the result delay is the number of cycles that the next sequential instruction would stall if it used the result as an input. the issue cycles are the number of cycles that this instruction takes to issue. for most instructions, the result delay is zero and the issue cycles is one. for load and stores, the timing is for cache hits. * other brands and names are the property of their respective owners. table 4-1. instruction timing instruction group result delay issue cycles data processing 0 1 mul or mul/add giving 32-bit result 1..3 1 mul or mul/add giving 64-bit result 1..3 2 load single ? write-back of base 0 1 load single ? load data zero extended 1 1 load single ? load data sign extended 2 1 store single ? write-back of base 0 1 load multiple (delay for last register) 1 max (2, number of registers loaded) store multiple ? write-back of base 0 max (2, number of registers loaded) branch or branch and link 0 1 mcr 2 1 mrc 1 1 msr to control 0 3 mrs 0 1 swap 2 2

sa-1110 developer ? s manual 5-1 coprocessors 5 the operation and configuration of the intel ? strongarm * sa-1110 microprocessor (sa-1110) is controlled with coprocessor instructions, configuration pins, and memory-management page tables. the coprocessor 15 instructions manipulate on-chip registers that control the configuration of the cache, write buffer, mmu, read buffer, breakpoints, and other configuration options. note: the gray areas in the register and translation diagrams are reserved and should be programmed 0 for future compatibility. 5.1 internal coprocessor instructions the on-chip cache, mmu, write buffer, and read buffers are controlled using mrc instructions and mcr instructions. these operations to coprocessor 15 are allowed only in nonuser modes except when read-buffer operations are explicitly enabled. the undefined instruction trap is taken if accesses are attempted in user mode. figure 5-1 shows the format of internal coprocessor instructions mrc and mcr. figure 5-1. format of internal coprocessor instructions mrc and mcr * other brands and names are the property of their respective owners. 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 cond 1110 n crn rd 1 111 opc_2 1 crm cond arm * condition codes n 1 mrc register read 0 mcr register write crn sa-1110 register rd arm register opc_2 function bits for some mrc/mcr instructions crm function bits for some mrc/mcr instructions
5-2 sa-1110 developer ? s manual coprocessors 5.2 coprocessor 15 definition the sa-1110 coprocessor 15 contains registers that control the cache, mmu, and write buffer operation as well as some clocking functions. these registers are accessed using cprt instructions to coprocessor 15 with the processor in any privileged mode. only some of registers 0 ? 15 are valid; the result of an access to an invalid register is unpredictable. table 5-1 lists the coprocessor 15 control registers. 5.2.1 register 0 ? id register 0 is a read-only register that returns an architecture and implementation-defined identification for the device. table 5-1. cache and mmu control registers (coprocessor 15) register register reads register writes 0id reserved 1 control control 2 translation table base translation table base 3 domain access control domain access control 4 reserved reserved 5 fault status fault status 6 fault address fault address 7 reserved cache operations 8 reserved tlb operations 9 reserved read buffer operations 10..12 reserved reserved 13 read process id (pid) write process id (pid) 14 read breakpoint write breakpoint 15 reserved test, clock, and idle register 0 ? id read-only 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 69 architecture version part number stepping architecture version arm architecture version 01 = version 4 part number part number b11 = SA1110 stepping stepping revision of sa-1110 0000 = a0 stepping 0100 = b0 stepping 0101 = b1 stepping 0110 = b2 stepping 1000 = b4 stepping
sa-1110 developer ? s manual 5-3 coprocessors 5.2.2 register 1 ? control register 1 is a read/write register containing control bits. all writable bits in this register are forced low by reset. the shaded bits (also labeled r) are reserved and are not readable or writable.. register 1 ? control read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 undefined xi undefined rs b 111wcam (sheet 1 of 2) bits name description 0m enable/disable 0 ? on-chip memory-management unit disabled 1 ? on-chip memory-management unit enabled 1a address fault enable/disable 0 ? alignment fault disabled 1 ? alignment fault enabled 2c data cache enable/disable 0 ? data cache disabled 1 ? data cache enabled 3w write buffer enable/disable 0 ? write buffer disabled 1 ? write buffer enabled 4p 32-bit/26-bit exception handlers. should always be 1. 5d 32-bit/26-bit data address range. should always be 1. 6l implementation defined. should always be 1. 7b big/little endian 0 ? little endian operation 1 ? big endian operation 8s system this bit selects the access checks performed by the memory-management unit. see the arm architecture reference for more information. 9r rom this bit selects the access checks performed by the memory-management unit. see the arm architecture reference for more information. 11..10 ? unused. undefined on read. writes ignored. 12 i instruction cache enable/disable 0 ? instruction cache disabled 1 ? instruction cache enabled
5-4 sa-1110 developer ? s manual coprocessors 5.2.3 register 2 ? translation table base register 2 is a read/write register that holds the base of the currently active level 1 page table. bits 13:0 are undefined on read, ignored on write. 5.2.4 register 3 ? domain access control register 3 is a read/write register that holds the current access control for domains 0 to 15. refer to the arm architecture reference for a description of the domain structure. 13 x virtual interrupt vector adjust 0 ? base address of interrupt vectors is 0h0000 0000 1 ? base address of interrupt vectors is 0hffff 0000 31..14 ? unused. undefined on read. writes ignored. register 1 ? control read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 undefined xi undefined rs b 111wcam (sheet 2 of 2) bits name description register 2 ? translation table base read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 translation table base undefined register 3 ? domain access control read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 210
sa-1110 developer ? s manual 5-5 coprocessors 5.2.5 register 4 ? reserved accessing register 4 may yield unpredictable results. 5.2.6 register 5 ? fault status reading register 5 returns the current contents of the fault status register (fsr). the fsr is written when a data memory fault occurs or can be written by an mcr to the fsr. it is not updated for a prefetch fault. see chapter 7, ? memory management unit (mmu) ? for more details. bits 31:10 are undefined on read, ignored on write. bit 9 is set when a data breakpoint is taken and can be cleared by an mcr operation. bit 8 is ignored on write and is always returned as zero. refer to the arm architecture reference for a description of the domain and status fields. 5.2.7 register 6 ? fault address reading register 6 returns the current contents of the fault address register (far). the far is written when a data memory fault occurs with the virtual address of the data fault or can be written by an mcr to the far. 5.2.8 register 7 ? cache control operations register 7 is a write-only register. the crm and opc_2 fields are used to encode the cache control operations. operation for all other values for opc_2 and crm is unpredictable. register 5 ? fault status 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 undefined d0 domain status register 6 ? fault address 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 fault virtual address function opc_2 crm data flush i+d 0b000 0b0111 ignored flush i 0b000 0b0101 ignored flush d 0b000 0b0110 ignored
5-6 sa-1110 developer ? s manual coprocessors 5.2.9 register 8 ? tlb operations register 8 is a write-only register. the crm and opc_2 fields are used to encode the following tlb flush operations. operation for all other values of opc_2 and crm is unpredictable. 5.2.10 register 9 ? read-buffer operations the read buffer is controlled and accessed through register 9 of coprocessor 15. the functions supported are: flush-all buffers, flush-a-single entry, load-an-entry (1, 4 or 8 words), and enable/disable user mode access. the crm and opc_2 fields are used to encode these control operations. all other values for opc_2 and crm are undefined and the results of using them are unpredictable. flush d single entry 0b001 0b0110 virtual address clean dcache entry 0b001 0b1010 virtual address drain write buffer 0b100 0b1010 ignored function opc_2 crm data function opc_2 crm data flush i+d 0b000 0b0111 ignored flush i 0b000 0b0101 ignored flush d 0b000 0b0110 ignored flush d single entry 0b001 0b0110 virtual address function opc_2 crm data flush all entries 0b000 0b0000 ignored flush buffer 0 0b001 0b0000 ignored flush buffer 1 0b001 0b0001 ignored flush buffer 2 0b001 0b0010 ignored flush buffer 3 0b001 0b0011 ignored load buffer 0 with one word 0b010 0b0000 virtual address load buffer 0 with four words 0b010 0b0100 virtual address load buffer 0 with eight words 0b010 0b1000 virtual address load buffer 1 with one word 0b010 0b0001 virtual address load buffer 1 with four words 0b010 0b0101 virtual address load buffer 1 with eight words 0b010 0b1001 virtual address load buffer 2 with one word 0b010 0b0010 virtual address load buffer 2 with four words 0b010 0b0110 virtual address load buffer 2 with eight words 0b010 0b1010 virtual address load buffer 3 with one word 0b010 0b0011 virtual address load buffer 3 with four words 0b010 0b0111 virtual address
sa-1110 developer ? s manual 5-7 coprocessors see chapter 6, ? caches, write buffer, and read buffer ? for details on the use and operation of the read buffer. 5.2.11 registers 10 ? 12 reserved accessing registers 10 ? 12 may yield unpredictable results. 5.2.12 register 13 ? process id virtual address mapping the sa-1110 supports the remapping of virtual addresses through a process id (pid) register. the 6-bit pid value is or ? ed with bits 30..25 of the virtual address when bits 31..25 of the virtual address are zero. this effectively remaps the address to one of 64 ? slots ? in the lower 2 gbyte address space. the following table shows the opc_2 and crm field encodings used to access the process id register. this register is zero at reset and if left unmodified, effectively disables the remapping function. as such, no explicit enable or disable function is necessary. reserved bits read as zero and must be written as zero. this register is readable and writable. the following figure shows the format of the process id register. 5.2.13 register 14 ? debug support (breakpoints) the sa-1110 supports address and data breakpoints through register 14 of coprocessor 15. the instruction formats follow. for a description of the breakpoint operation, see chapter 15, ? debug support ? . the following table shows the opc_2 and crm field encodings used to access the address and data breakpoints. load buffer 3 with eight words 0b010 0b1011 virtual address disable user-mode mcr access 0b100 0b0000 ignored enable user-mode mcr access 0b101 0b0000 ignored function opc_2 crm data function opc_2 crm access process id register 0b000 0b0000 register 13 ? process id read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved process id reserved
5-8 sa-1110 developer ? s manual coprocessors the dbcr register is a 3-bit register used to control the enabling and disabling of the data breakpoints. bits 0..2 are valid and positioned as shown below. bits 3..31 are reserved. these bits read as zeros and writes have no effect. the ibcr is a write-only register used to load an address breakpoint address and to set an enable bit for the function. if an address is loaded with bit 0 (e) set, then the address is enabled as a breakpoint. if bit zero is cleared, then the breakpoint is disabled. bit 1 is reserved and should be written to zero. function opc_2 crm access data breakpoint address register (dbar). 0b000 0b0000 access data breakpoint value register (dbvr). 0b000 0b0001 access data breakpoint mask register (dbmr). 0b000 0b0010 load data breakpoint control register (dbcr). 0b000 0b0011 write instruction breakpoint address and control register (ibcr). 0b000 0b1000 data breakpoint control register (dbcr) read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved sdw saw lw bits name description 0lw load watch 0 ? disable load watch 1 ? enable load watch 1saw store address watch 0 ? disable store address watch 1 ? enable store address watch 2sdw store data watch 0 ? disable store data watch 1 ? enable store data watch 31..3 ? reserved.
sa-1110 developer ? s manual 5-9 coprocessors 5.2.14 register 15 ? test, clock, and idle control register 15 is a write-only register. the crm and opc_2 fields are used to encode the following control operations. operation for all other values of opc_2 and crm is unpredictable. instruction breakpoint address and control register (ibcr) write-only 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 instruction address breakpoint value reserved e bits name description 0e address break enable/disable. 0 ? disable 1 ? enable 1 ? reserved. should be written as zero. 31..2 address breakpoint address. function opc_2 crm enable odd-word loading of the linear feedback shift register ( lfsr) 0b001 0b0001 enable even-word loading of lfsr 0b001 0b0010 clear lfsr 0b001 0b0100 move lfsr to r14.abort 0b001 0b1000 enable clock switching 0b010 0b0001 disable clock switching 0b010 0b0010 reserved 0b010 0b0100 wait for interrupt 0b010 0b1000

sa-1110 developer ? s manual 6-1 caches, write buffer, and read buffer 6 to reduce effective memory access time, the intel ? strongarm * sa-1110 microprocessor (sa-1110) has an instruction cache, a data cache, a write buffer, and a read buffer. all except the read buffer are transparent to program execution. the following sections describe each of these units and give all necessary programming information. 6.1 instruction cache (icache) the sa-1110 contains a 16 kbyte instruction cache (icache). the icache has 512 lines of 32 bytes (8 words), arranged as a 32-way set associative cache, and uses the virtual addresses generated by the processor core. the icache is always reloaded a line at a time (8 words). it may be enabled or disabled via the sa-1110 control register, and is disabled on the assertion of nreset or through a software or sleep reset sequence. (see chapter 9, ? system control module ? for details.) the operation of the cache, when memory management is enabled, is further controlled by the cacheable or c bit stored in the memory-management page table. if memory management is disabled, all addresses are marked as cacheable (c=1). when memory management is enabled, the c bit in each page table entry can disable caching for an area of virtual memory. 6.1.1 icache operation in the sa-1110, the instruction cache is searched regardless of the state of the c bit; only reads that miss the cache are affected. if, on an icache miss, the c bit is a one or the memory management unit (mmu) is disabled, a line fetch of 8 words is performed and it is placed in a cache bank with a round-robin replacement algorithm. if, on a miss, the mmu is enabled and the c bit is a zero for the given virtual address, an external memory access for a single word is performed and the cache is not written.the icache should be enabled as soon as possible after reset for best performance. 6.1.2 icache validity the icache operates with virtual addresses, so care must be taken to ensure that its contents remain consistent with the virtual-to-physical mappings performed by the memory management unit. if the memory mappings are changed, the icache validity must be ensured. the icache is not coherent with stores to memory, so programs that write cacheable instruction locations must ensure the icache validity. instruction fetches do not check the write buffer, so data must not only be pushed out of the cache but the write buffer must also be drained. 6.1.2.1 software icache flush the entire icache can be invalidated by writing to the sa-1110 cache operations register (register 7). the cache is flushed immediately when the register is written, but note that the following instruction fetches may come from the cache before the register is written. * other brands and names are the property of their respective owners.
6-2 sa-1110 developer ? s manual caches, write buffer, and read buffer 6.1.3 icache enable/disable and reset the icache is automatically disabled and flushed on the assertion of nreset. once enabled, cacheable read accesses cause lines to be placed in the cache. if the icache is subsequently disabled, no new lines are placed in the cache, but the cache is still searched and if the data is found, it will be used by the processor. if the data in the cache must not be used, then the cache must be flushed. 6.1.3.1 enabling the icache to enable the icache, set bit 12 in the control register. the mmu and icache may be enabled simultaneously with a single control register write. 6.1.3.2 disabling the icache to disable the icache, clear bit 12 in the control register. 6.2 data caches (dcaches) the sa-1110 contains two logically separate data caches: the main data cache and the mini data cache (or minicache). the main data cache, an 8 kbyte write-back dcache, has 256 lines of 32 bytes (8words) in a 32-way set-associative organization. it is intended for use during most data accesses. this cache allocates on loads to spaces marked b=1 and c=1. replacements in the main data cache are selected according to a set of round-robin pointers. at reset, the pointer in each block of the dcache points to way zero of each 32-way block. as lines are allocated, the pointers are incremented to the next way of the set. after way 31 is allocated, the next line fill replaces (and copies back to memory, if dirty) the data in way zero. the minicache is a 512-byte write-back cache. it has 16 lines of 32 bytes (8 words) in a two-way set-associative organization and provides an alternate caching structure for dealing with large data structures that could thrash the main data cache. this cache allocates on loads to spaces marked b=0 and c=1. replacements in the minicache use the same round-robin pointer mechanism as in the main data cache. however, since this cache is only two-way set-associative, the replacement algorithm reduces to a simple least-recently-used (lru) mechanism. the dcaches are accessed in parallel and the design ensures that a particular line entry will exist in only one of the two at any time. both dcaches use the virtual address generated by the processor and allocate only on loads (write misses never allocate in the cache). each line entry contains the physical address of the line and two dirty bits. the dirty bits indicate the status of the first and the second halves of the line. when a store hits in the dcaches, the dirty bit associated with it is set. when a line is evicted from the dcaches, the dirty bits are used to decide if all, half, or none of the line will be written back to memory using the physical address stored with the line. the dcaches are always reloaded a line at a time (8 words). the dcaches allocate only on loads and according to the settings of the b and c bits in the mmu. if b=0 and c=1, the memory access allocates into the minicache. if b=1 and c=1, the memory access allocates into the main data cache. the dcaches should be flushed prior to changing the bufferable and/or cacheable state of the page table mapping. the main data cache and the minicache are enabled and disabled via the sa-1110 control register, and are disabled on nreset as well as software, sleep, and watchdog reset. the operation of the dcaches is further controlled by the cacheable or c bit and the bufferable or b bit stored in the
sa-1110 developer ? s manual 6-3 caches, write buffer, and read buffer memory-management page table. for this reason, in order to use the dcaches, the mmu must be enabled. the two functions may be enabled simultaneously with a single write to the control register. note: the dcaches operate with virtual addresses, so care must be taken to ensure that their contents remain consistent with the virtual-to-physical mappings performed by the memory-management unit. if the memory mappings are changed, the validity of the dcaches must be ensured. 6.2.1 cacheable bit ? c the cacheable bit determines whether, on load misses, the data being read should be placed in one of the two data caches. cache hits are not affected by the cacheable bit; if a data access hits in the cache, the data is assumed to be valid and the load or store is performed. typically, main memory is marked as cacheable to improve system performance and i/o space as noncacheable to stop the data from being stored in sa-1110 ? s cache. for example, if the processor is polling a hardware flag in i/o space, it is important that the processor is forced to read data from the external peripheral, and not a copy of initial data held in the cache. 6.2.1.1 cacheable reads ? c = 1 a linefetch of 8 words will be performed and it will be placed in a cache bank with a round-robin replacement algorithm. 6.2.1.2 noncacheable reads ? c = 0 an external memory access will be performed and the cache will not be written. 6.2.2 bufferable bit ? b the bufferable bit does not affect writes that hit the dcaches. if a store hits in the dcaches, the store is assumed to be bufferable. write-backs of dirty lines are treated as bufferable writes. see the section 6.3, ? write buffer (wb) ? on page 6-5 for more information on the b bit. table 6-1 summarizes the effects of the b and c bits on the dcaches. table 6-1. effects of the cacheable and bufferable bits on the data caches load store bc cache hit cache miss cache hit cache miss 0 0 deliver cache data. load from memory. ? no allocate. store to either cache. ? mark line dirty. store to memory. ? no allocate. 0 1 deliver cache data. allocate to minicache. store to either cache. ? mark line dirty. store to memory. ? no allocate. 1 0 deliver cache data. load from memory. ? no allocate. store to either cache. ? mark line dirty. store to memory. ? no allocate. 1 1 deliver cache data. allocate to main data cache. store to either cache. ? mark line dirty. store to memory. ? no allocate.
6-4 sa-1110 developer ? s manual caches, write buffer, and read buffer 6.2.3 software dcache flush the sa-1110 supports the flush and clean operations on single entries of the dcaches by writes to the cache operations registers. the flush whole cache is also supported. note that since this is a write-back cache, in order to prevent the loss of data, a flush whole must be preceded by a sequence of loads to cause the cache to write back any dirty entries. the memory controller in the sa-1110 provides an internally decoded memory space to perform coherent dcache flushing. this space resides in the upper 512 megabytes of the memory map (starting at virtual address 0he000 0000) and, when accessed, is detected by the memory controller, which then returns zeros without incurring an external memory latency. the following code causes the main data cache to flush all dirty entries: a similar routine may be written to flush the minicache. to perform this flush, the mmu b and c settings must be as described above. the invalidate-all operation also invalidates the minicache. 6.2.3.1 doubly mapped space since the dcaches work with virtual addresses, it is assumed that every virtual address maps to a different physical address. if the same physical location is accessed by more than one virtual address, the cache cannot maintain consistency, since each virtual address has a separate entry in the cache, and only one entry is updated on a processor write operation. to avoid any cache inconsistencies, doubly mapped virtual addresses should be marked as noncacheable. 6.2.4 dcaches enable/disable and reset the dcaches are automatically disabled and flushed on the assertion of nreset. once enabled, cacheable read accesses cause lines to be placed in the dcaches. if subsequently disabled, no new lines are placed in the dcaches, but they are still searched and if the data is found, it is used by the processor. write operations continue to update the dcaches, thus maintaining consistency with the external memory. if the data in the dcaches must not be used, then the dcaches must be flushed. ; + ;call: ; r0 points to the start of a 8192 byte region of readable data used ; only for this cache flushing routine. ; bl writebackdc ;return: ; r0, r1, r2 trashed ; data cache is clean ;- writebackdc movr0, 0he0000000 addr1, r0, #8192 l1 ldr r2, r0, #32 teq r1, r0 bnel1 mcrp15, 0, r0, c7, c6, 0 movpc, r14
sa-1110 developer ? s manual 6-5 caches, write buffer, and read buffer 6.2.4.1 enabling the dcaches to enable the dcaches, make sure that the mmu is enabled first by setting bit 0 in the control register, then enable the dcaches by setting bit 2 in the control register. the mmu and dcaches can be enabled simultaneously with a single control register write. 6.2.4.2 disabling the dcaches to disable the dcache, clear bit 2 in the control register. 6.3 write buffer (wb) the sa-1110 write buffer is used to improve system performance by buffering up to 8 blocks of data of 1 to 16 bytes, at independent addresses. it can be enabled or disabled via the w bit (bit 3) in the sa-1110 control register. the buffer is disabled and all entries are marked empty following reset. operation of the write buffer is further controlled by the cacheable or c bit and the bufferable or b bit, which are stored in the memory-management page tables. for this reason, in order to use the write buffer, the mmu must be enabled. the two functions can be enabled simultaneously with a single write to the control register. for a write to use the write buffer, both the w bit in the control register and the b bit in the corresponding page table must be set. it is not possible to abort buffered writes externally. stores will not merge with other data at the same line address in the write buffer with the exception of store multiples, which do merge. 6.3.1 bufferable bit this bit controls whether a write operation may use the write buffer. typically, main memory is bufferable and i/o space unbufferable. 6.3.2 write buffer operation when the cpu performs a store, the dcaches are first checked. if one of the dcaches hits on the store and the protection for the location and mode of the store allows the write, then the write completes in the dcaches and the write buffer is not used. if the location misses in the dcaches, then the translation entry for that address is inspected and the state of the b and c bits determines which of the three following actions are performed. if the write buffer is disabled via the sa-1110 control register, writes are treated as if the b bit is a zero. 6.3.2.1 writes to a bufferable and cacheable location (b=1,c=1) if the write buffer is enabled and the processor performs a write to a bufferable and cacheable location, and the data is in one of the caches, then the data is written to that cache, and the cache line is marked dirty. if a write to a bufferable area misses in both data caches, the data is placed in the write buffer and the cpu continues execution. the write buffer performs the external write sometime later. if a write is performed and the write buffer is full, then the processor is stalled until there is sufficient space in the buffer. no write buffer merging is allowed in the sa-1110 except during store multiples.
6-6 sa-1110 developer ? s manual caches, write buffer, and read buffer 6.3.2.2 writes to a bufferable and noncacheable location (b=1,c=0) if the write buffer is enabled and the processor performs a write to a bufferable but noncacheable location and misses in the dcaches, the data is placed in the write buffer and the cpu continues execution. as with the cacheable case, merging is allowed only on store multiples. the write buffer performs the external write sometime later. 6.3.2.3 unbufferable writes (b=0) if the write buffer is disabled or the cpu performs a write to an unbufferable area, the processor is stalled until the write buffer empties and the write completes externally. this requires several external clock cycles. 6.3.3 enabling the write buffer to enable the write buffer, ensure that the mmu is enabled by setting bit 0 in the control register, then enable the write buffer by setting bit 3 in the control register. the mmu and write buffer can be enabled simultaneously with a single write to the control register. 6.3.3.1 disabling the write buffer to disable the write buffer, clear bit 3 in the control register. any writes already in the write buffer will complete normally, but a drain write buffer needs to be done to force all writes out to memory. note: the write buffer is used to hold dirty copy-back cached lines from the data cache. it must be enabled along with the data cache. 6.4 read buffer (rb) the sa-1110 contains a software-programmable read buffer that can increase the performance of critical loop code by prefetching data. the rb enables the preallocation of read-only data into one of four 32-byte buffers without stalling the pipe. for subsequent loads that hit in the rb, data is sourced from the buffer instead of the dcaches at a rate of 1 word per core clock. also, because the programmer specifies which entry of the rb is used, critical data can be ? locked ? in to eliminate bus latency. the rb is controlled using coprocessor 15, register 9, and provides the capability to allocate 1 word, a half-line (4 words), or a full line (8 words) into one of four entries of the rb. (see chapter 5, ? coprocessors ? for a detailed rb coprocessor description.) half-line loads are automatically aligned onto half-block boundaries (the lower four address bits are ignored). full-line loads are automatically aligned onto line boundaries (the lower five address bits are ignored). for partial cache line rb loads, only the words actually fetched are marked valid and can be sourced from the buffer. a small queue is used to ensure that subsequent rb load instructions go out in order. when an rb allocate instruction is executed, the virtual address is looked up in the tb to check for a translation hit and possible access violations. if the access misses in the tb, the pipe is stalled until the page is fetched through the normal hardware tablewalk mechanism. if an access violation occurs, the rb load is nop ? d. for example, an rb allocate instruction can generate a data abort.
sa-1110 developer ? s manual 6-7 caches, write buffer, and read buffer once the rb allocate has received a tb hit and no access violations, a bus access is requested that fills the appropriate buffer without stalling the core pipeline. subsequent load instructions to this virtual address result in an rb hit and data is sourced from the appropriate entry to the core. any two data words with the same virtual address may not be contained in the rb at the same time. if an rb allocate references a data word that is already contained in another rb entry, then the old rb entry is invalidated and the new allocation is performed. it is possible for a portion of a cache clock at a given virtual address to be contained in one rb entry while another portion of the same block is contained in another rb entry. however, a given word can not be in more than one entry at a time. if a load instruction misses in the rb, then a normal cache fill is performed (provided the cache is enabled and the page is marked cacheable). it then presents the possibility of having a partial line resident in the rb as well as having the line present in one of the dcaches. this presents coherency issues that must be managed by software. if this situation does occur and the addressed data is in both the dcache and the rb, then the data is sourced from the rb. if an rb entry contains a partial cache block (1 or 4 words), then those words will be sourced from the rb while the remaining words are sourced from the data cache or memory. rb allocate instructions are not affected by the cache enable bit (bit 2 in the control register) or by the c bit in the mmu. any rb allocate to a valid rb entry causes that rb entry to be invalidated, followed by a new allocation for the desired data. this occurs regardless of the address of the data currently in the buffer. for example, back-to-back rb allocate instructions to the same entry at the same address will invalidate the entry caused by the first instruction prior to performing the second fill. an rb allocate or a load instruction that is issued to an rb entry currently being filled will stall until the fill completes. if a data abort is signaled on a read buffer allocate, the fill completes. after that, if a load to that entry is attempted, a data abort exception is issued. the coprocessor 15 register provides the ability to invalidate individual entries in the rb or to invalidate the entire buffer in one operation. rb coherency must be managed in software. writes to addresses present in the read buffer are not written into the buffer. specific rb entries must be invalidated before writing to the addresses or changing the page tables of the entries. coherency is not checked between the rb and the wb. the wb should be drained prior to performing an rb load.

sa-1110 developer ? s manual 7-1 memory management unit (mmu) 7 this chapter describes the memory management functions. 7.1 overview the intel ? strongarm * sa-1110 microprocessor (sa-1110) implements the standard arm * memory-management functions using two 32-entry fully associative translation buffers (tbs). one is used for instruction accesses and the other for data accesses. on a tb miss, the translation table hardware is invoked to retrieve the translation and access permission information. once retrieved, if the entry maps to a valid page or section, then the information is placed into the tb. the replacement algorithm in the tb is round robin. for an invalid page or section, an abort is generated and the entry is not placed in the tb. 7.1.1 mmu registers see section 5.2, ? coprocessor 15 definition ? on page 5-2 for a description of the memory management unit (mmu) coprocessor 15 registers supported by the sa-1110. 7.2 mmu faults and cpu aborts the mmu generates four faults:  alignment fault  translation fault  domain fault  permission fault alignment faults are generated by word loads or stores with the low-order two address bits nonzero, and by load or store half words when the low-order address bit is a one. translation faults are generated by access to pages marked invalid by the memory-management page tables. domain faults and permission faults are generated by accesses to memory that are protected by the current mode, domain, and page protection. see the arm architecture reference for more information. in addition, an external abort may be raised on external data accesses. 7.3 data aborts the sa-1110 takes a data abort exception due to: mmu-generated exceptions, accessing reserved memory space, and assertion of the abort pin while accessing expansion memory. writes to memory areas marked as bufferable ignore the external abort pin. * other brands and names are the property of their respective owners.
7-2 sa-1110 developer ? s manual memory management unit (mmu) 7.3.1 cacheable reads (linefetches) a linefetch can be safely aborted on any word in the transfer. if an abort occurs during the linefetch, the cache is purged so it will not contain invalid data. if the abort happens before the word that was requested by the access is returned, the load is aborted. if the abort happens after the word that was requested by the access is returned, the load completes and the fill is aborted (but no exception is generated). 7.3.2 buffered writes buffered writes cannot be externally aborted. therefore, the system should be configured such that it does not perform buffered writes to areas of memory that are capable of flagging an external abort. 7.4 interaction of the mmu, icache, dcache, and write buffer the mmu, icache, dcache, and wb can be enabled or disabled independently. the icache can be enabled with the mmu enabled or disabled. however, the dcache and wb can only be enabled when the mmu is enabled. because the write buffer is used to hold dirty copy-back cached lines from the dcache, it must be enabled along with the dcache. therefore, only four of the eight combinations of the mmu, dcache, and wb enables are valid. there are no hardware interlocks on these restrictions, so invalid combinations will cause undefined results. the following procedures must be observed. to enable the mmu: 1. program the translation table base and domain access control registers. 2. program level 1 and level 2 page tables as required. 3. enable the mmu by setting bit 0 in the control register. table 7-1. valid mmu, dcache, and write buffer combinations mmu dcache write buffer off off off on off off on off on on on on
sa-1110 developer ? s manual 7-3 memory management unit (mmu) note: care must be taken if the translated address differs from the untranslated address because the three instructions following the enabling of the mmu will have been fetched using ? flat translation ? , and enabling the mmu may be considered a branch with delayed execution. a similar situation occurs when the mmu is disabled. consider the following code sequence: to disable the mmu: 1. disable the wb by clearing bit 3 in the control register. 2. disable the dcache by clearing bit 2 in the control register. 3. disable the icache by clearing bit 12 in the control register. 4. disable the mmu by clearing bit 0 in the control register. note: if the mmu is disabled and subsequently reenabled, the contents of the tb is preserved. if the contents are now invalid, the tb should be flushed before reenabling the mmu. 7.5 mini data cache the mini data cache is a 16-entry, 2-way set-associative data cache. it is accessed in parallel with the main data cache. a data reference is allocated into the mini data cache if the b and c bits in the mmu are 0 and 1, respectively. a line of data can reside only in one of the two dcaches at any one time. both dcaches must be flushed prior to any page table manipulation that could change the allocation policy. mov r1, #0x1 mcr 15,0,r1,0,0 ; enable mmu fetch nontranslated fetch nontranslated fetch nontranslated fetch translated

sa-1110 developer ? s manual 8-1 clocks 8 this section describes the intel ? strongarm * sa-1110 microprocessor (sa-1110) clocks. the following diagram shows the distribution of clocks in the sa-1110. the 3.6864-mhz oscillator feeds both plls. the primary pll provides clocks for the core logic and a 7.36-mhz clock for several of the serial controllers. the core, dcaches, and read and write buffers use either the full-speed core clock or the divided-down clock. the lcd controller, dma, memory controller, and gpio use the core clock divided by 2 (rclk). the 32.768-khz oscillator feeds the real-time clock (rtc) and the power manager logic. the secondary pll provides the clock for the udc, the icp, and the mcp. the oscillators and plls are completely integrated with the sa-1110 and require no external devices other than the crystals for operation.the following figure shows a block diagram of the clocking system for the sa-1110. figure 8-1. sa-1110 clock system block diagram * other brands and names are the property of their respective owners. a8054-01 32.768 khz oscillator primary pll 59 mhz - 200 mhz secondary pll 48 mhz gpio 27 peripherals uart: 7.36 mhz icp: 7.36 or 48 mhz mcp/ssp: 7.36 or 12 mhz ppc: 7.36 mhz udc: 48 mhz 3.6864 mhz oscillator divide by 2 intel ? arm* sa-1 core lcd controller rtc and power manager dma controller memory controller i/o controller write buffer i-cache d-cache read buffer
8-2 sa-1110 developer ? s manual clocks 8.1 intel ? strongarm sa-1110 crystal oscillators the sa-1110 clocks are derived from two crystals connected to on ? chip oscillators. the first clock source is a 3.6864-mhz crystal that feeds the cpu pll and the 48-mhz pll. the cpu pll multiplies the oscillator output up to the core frequency. this frequency is then divided down to generate baud rates for the serial ports. if the uarts are not being used or do not need standard baud rates, then the 3.6864 -hz oscillator may be replaced with a 3.5795-mhz crystal to generate frequencies as shown in table 8-1 .the second oscillator is connected to a 32.768-khz crystal. the output of this oscillator clocks the power management controller and the real-time clock (rtc). see appendix b, ? 3.6864 ? mhz oscillator specifications ? and appendix c, ? 32.768 ? khz oscillator specifications ? for detailed specifications of the crystal oscillators. 8.2 core clock configuration register the core clock frequency is configured by software through the core clock configuration field (ccf 4:0) in the power manager phase-locked loop (pll) configuration register (ppcr). this field should be programmed during the boot sequence for the desired full-speed operation. nreset clears the field by selecting the lowest frequency operation. see section 9.5, ? power manager ? on page 9-26 for the physical address used to access this register. table 8-1 shows the core clock frequency as a function of the ccf setting. the actual core clock (dclk) can switch between being driven by the high speed core clock (cclk, set by ccf 4:0) and the memory clock (mclk), which runs at half the frequency of cclk. cclk is used except when the sa-1110 is waiting for fills to complete after a cache miss. table 8-1. core clock configurations ccf 4:0 core clock frequency in mhz 3.6864-mhz crystal oscillator 3.5795-mhz crystal oscillator 00000 59.0 57.3 00001 73.7 71.6 00010 88.5 85.9 00011 103.2 100.2 00100 118.0 114.5 00101 132.7 128.9 00110 147.5 143.2 00111 162.2 157.5 01000 176.9 171.8 01001 191.7 186.1 01010 206.4 200.5 01011 221.2 214.8 01100 ? 11111 not supported. ?
sa-1110 developer ? s manual 8-3 clocks at reset, clock switching is disabled and the dclk is driven by mclk. clock switching can also be disabled by writing to cp15 register 15 with opc_2 = 2 and crm = 2 (see section 5.2.14 ). clock switching is enabled by writing to cp15 register 15 with opc_2 = 2 and crm = 1. disabling clock switching only disables switching for dclk; it does not force the dclk to mclk. however, dclk can be forced to mclk by forcing an instruction or data cache miss after clock switching is disabled. 8.2.1 restrictions on changing the core clock configuration when the cpu writes to the ppcr, the core clock pll and the 48-mhz pll are stopped for a period of time to allow the core clock pll to relock to the new frequency. when these plls are stopped, the core clock and all clocks derived from that clock are stopped. when this happens, certain units within the sa-1110 (the lcd controller, all serial controllers, the dma controller, and the os timer) will experience an interruption in operation for approximately 150 microseconds after the ppcr is written. because of these restrictions, it is recommended that the user not change the ppcr except immediately following a hard reset or immediately following wake-up from sleep mode. the lcd controller, all serial controllers (except the udc), the dma controller, and the os timer are already disabled and are not affected by an interruption in their clock stream. in addition to these restrictions, the ppcr must be written prior to enabling clock switching. note that the 32.768-khz clock is not affected by any change in the ppcr and units using this clock (power management, rtc) do not see any interruption in service during the 150 microsecond period. 8.3 driving intel ? strongarm sa-1110 crystal pins from an external source in most applications, a 3.6864-mhz crystal will be connected between the pxtal and the pextal pins. similarly, a 32.768-khz crystal will be connected between the txtal and textal pins. in some applications, supplying these clocks from an external source may be preferred. this is accommodated in the sa-1110 design by:  supplying the 32.768-khz clock from an external source ? only the txtal pin is driven. the textal pin must be left floating. ? the peak-to-peak voltage swing on txtal must be at least 0.6 v and the voltage on the pin must remain within the range of 0 v to 1 v, independent of the other power supply voltages applied to the processor.  supplying a 3.6864-mhz clock from an external source ? both pxtal and pextal are driven with complementary signals. ? the peak-to-peak voltage swing on pxtal and pextal must be at least 0.6 v and the voltage on the pin must remain in the range of 0 v to 1 v, independent of the other power supply voltages applied to the processor. ? ? when an external clock is being used, the pull-down path in the internal 3.6864 mhz oscillator is active. in order to limit the current into the internal oscillator, it is recommended that the minimum impedance to the positive supply be controlled. the maximum current sourced by the external clock source when the clock is at its maximum positive voltage should be about 1 ma. ?
8-4 sa-1110 developer ? s manual clocks ? the maximum impedance of the external clock source is set by the minimum slew rate at the pxtal and pextal pins, approximately 1 v per 100 ns. ? ? these constraints can be satisfied by the following suggestions:  for applications in which a pulse generator is available, drive differential 1-v signals through series 1-k resistors (after the usual 50-ohm terminators-to-ground).  to supply external clock signals from a 3.3-v supply, drive signals with open collector or tristateable drivers. set high level with 3.3 k from 3.3 v to the output and 1.3 k from the output to ground.  to supply external clock signals from a 1.5-v supply, drive signals with open collector or tristatable drivers. set high level with 1.5 k from 1.5 v to the output and 2.7 k from output to ground. this solution may be preferred in portable applications that turn off the 1.5-v supply in sleep mode because this would eliminate the current through the resistors in sleep mode. the two pairs of crystal pins are located close to each other on the processor. this arrangement is advantageous when there are crystals connected to the pins because the low signal swings and slow edges result in limited noise coupling between the pins. if one of the crystals is replaced by an independent signal source and the other is not, some degradation of the remaining crystal oscillator performance can result due to increased noise coupling. if only one crystal is being used, this effect can be reduced by limiting the speed of the edge rate on the pin driven by the independent source. if the pxtal or txtal pin is driven above the voltage indicated, there will be no permanent damage to the processor for pin voltages less than 2.5 v. however, esd diodes on these pins will attempt to clamp the voltage at approximately 1.5 v. the clamping action results in significant noise injected into an internally generated supply used by several sensitive circuits on the processor. consequently, driving this pin higher than the 1 v limit can result in unpredictable operation not obviously connected with the crystal pins. it is advised to not drive the crystal pins higher than 1 v even if there is no obvious side effect. note: in every system, there must be a provision for both a 3.6864-mhz and a 32.768-khz source either from an external oscillator or a crystal. 8.4 clocking during test if tck_byp is high, then the plls and oscillators are not used and the high-speed core clock is supplied externally on the testclk pin. this mode is for testing only and is not supported for standard operation.
sa-1110 developer ? s manual 9-1 system control module 9 this chapter describes the system control module that controls several processor-wide system functions. the units contained in the system control module are: the general-purpose i/o ports, the interrupt controller, the real-time clock, the operating system timer, the power manager, and the reset controller. 9.1 general-purpose i/o the intel ? strongarm * sa-1110 microprocessor (sa-1110) provides 28 general-purpose i/o (gpio) port pins for use in generating and capturing application-specific input and output signals. each pin is programmable as an input or output and as an interrupt source. all 28 pins are configured as inputs during the assertion of reset, and remain inputs until they are configured otherwise. each gpio pin can be configured as an input or an output by programming the gpio pin direction register (gpdr). when programmed as an output, the pin can be controlled by writing to the gpio pin output set register (gpsr) and the gpio pin output clear register (gpcr). writing to these registers controls the output data register, which is not directly readable or writable. the set and clear registers can be written regardless of whether the pin is configured as an input or an output. the programmed output state will take effect when the pin is reconfigured as an output. when programmed as an input, the current state of each gpio pin can be read through the gpio pin-level register (gplr). this register can be read at any time and can be used to confirm the state of the pin when it is configured as an output. in addition, each gpio pin can be programmed to detect a rising and/or falling edge through the gpio rising-edge detect register (grer) and gpio falling-edge detect register (gfer). the state of the edge detect can be read through the gpio edge detect status register (gedr). these edge detects can be programmed to generate an interrupt (see the section 9.2, ? interrupt controller ? on page 9-11 ) or to serve as a wake-up event to bring the sa-1110 out of sleep mode (see the section 9.5, ? power manager ? on page 9-26 ). when the sa-1110 enters sleep mode, the contents of the power manager sleep state register (pgsr) is loaded into the output data register. if the particular pin is programmed as an output, then the state in the pgsr will be driven onto the pin before entering sleep. when the sa-1110 exits sleep mode, these values remain until reprogrammed by writing to the gpsr and gpcr. some gpio pins can also serve an alternate function within the sa-1110. certain modes within the serial controllers and lcd controller require extra pins. these functions are hard ? wired into specific gpio pins. how these functions are used is described in the following sections. even though a gpio pin has been taken over for an alternate function, you must still program the correct direction of that pin through the gpdr. details on alternate functions are also provided in following sections. figure 9-1 shows a block diagram of a single gpio pin. * other brands and names are the property of their respective owners.
9-2 sa-1110 developer ? s manual system control module figure 9-1. general-purpose i/o block diagram 9.1.1 gpio register definitions there are a total of eight registers within the gpio control block: one is used to monitor pin state; two are used to control pin state; one is used to control pin direction; two are used to specify a pin ? s edge type that should be detected; and one is used to flag when specified edge types are detected on pins. the last register indicates whether a pin is used as normal gpio or whether it is taken over by the alternate function. the values in all other gpio registers are unknown following reset and must be initialized by software. note: a question mark (?) signifies that the reset value of that bit is undefined when the processor has completed its reset cycle. edge detect gpio pin pin direction register pin set and clear registers alternate function (output) alternate function (input) edge detect status register pin-level register 0 1 alternate function register rising edge detect enable register falling edge detect enable register
sa-1110 developer ? s manual 9-3 system control module 9.1.1.1 gpio pin-level register (gplr) the state of each of the gpio port pins is visible through the gpio pin-level register (gplr). each bit number corresponds to the port pin number from bit 0 to bit 27. this is a read-only register that is used to determine the current level of a particular pin (regardless of the programmed pin direction). the following table shows the locations of the 28 pin-level bits within the gplr. this is a read-only register. for reserved bits, reads return zero; a question mark indicates that the values are unknown at reset. . note: a question mark (?) signifies that the reset value of that bit is undefined when the processor has completed its reset cycle. 0h 9004 0000 gplr read-only 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved pl27 pl26 pl25 pl24 pl23 pl22 pl21 pl20 pl19 pl18 pl17 pl16 pl15 pl14 pl13 pl12 pl11 pl10 pl9 pl8 pl7 pl6 pl5 pl4 pl3 pl2 pl1 pl0 reset 0 0 0 0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? bits name description npln gpio port pin level n (where n = 0 through 27). 0 ? pin state is low. 1 ? pin state is high 31..28 ? reserved
9-4 sa-1110 developer ? s manual system control module 9.1.1.2 gpio pin direction register (gpdr) pin direction is controlled by programming the gpio pin direction register (gpdr). the gpdr contains one direction control bit for each of the 28 port pins. if a direction bit is programmed to a one, the port is an output. if it is programmed to a zero, it is an input. at hardware reset, all bits in this register are cleared, configuring all gpio pins as inputs. soft resets and sleep reset have no effect on this register. for reserved bits, writes are ignored and reads return zero. the following table shows the location of each pin direction bit in the gpio pin direction register. . 0h 9004 0004 gpdr read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved pd27 pd26 pd25 pd24 pd23 pd22 pd21 pd20 pd19 pd18 pd17 pd16 pd15 pd14 pd13 pd12 pd11 pd10 pd9 pd8 pd7 pd6 pd5 pd4 pd3 pd2 pd1 pd0 reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 bits name description npdn gpio port pin direction n (where n = 0 through 27). 0 ? pin configured as an input. 1 ? pin configured as an output. 31..28 ? reserved
sa-1110 developer ? s manual 9-5 system control module 9.1.1.3 gpio pin output set register (gpsr) and pin output clear register (gpcr) when a port is configured as an output, the user controls the state of the pin by writing to either the gpio pin output set register (gpsr) or the gpio pin output clear register (gpcr). an output pin is set by writing a one to its corresponding bit within the gpsr. to clear an output pin, a one is written to the corresponding bit within the gpcr. these are write-only registers. reads return unpredictable values. writing a zero to any of the gpsr or gpcr bits has no effect. writing a one to a gpsr or gpcr bit corresponding to a pin that is configured as an input has no effect. for reserved bits, writes are ignored. the following tables show the locations of the gpsr bits and the locations of the gpcr bits. these are write-only registers and reset values do not apply. the user can test a bit within the gplr corresponding to a pin that is configured as an output after having set or cleared the pin state to determine if there is an external conflict on the pin. for example, if an off-chip device is driving a gpio output pin high and the user has cleared the pin ? s state by writing a one to its gpcr bit, the user can read the gplr, then compare the written value (zero) to the actual value (one) to detect the conflict. 0h 9004 0008 gpsr write-only 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved ps27 ps26 ps25 ps24 ps23 ps22 ps21 ps20 ps19 ps18 ps17 ps16 ps15 ps14 ps13 ps12 ps11 ps10 ps9 ps8 ps7 ps6 ps5 ps4 ps3 ps2 ps1 ps0 bits name description npsn gpio output pin set n (where n = 0 through 27). 0 ? pin level unaffected. 1 ? if pin configured as an output, set pin level high (one). 31..28 ? reserved 0h 9004 000c gpcr write-only 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved pc27 pc26 pc25 pc24 pc23 pc22 pc21 pc20 pc19 pc18 pc17 pc16 pc15 pc14 pc13 pc12 pc11 pc10 pc9 pc8 pc7 pc6 pc5 pc4 pc3 pc2 pc1 pc0 bits name description npcn gpio output pin clear n (where n = 0 through 27). 0 ? pin level unaffected. 1 ? if pin configured as an output, clear pin level low (zero). 31..28 ? reserved
9-6 sa-1110 developer ? s manual system control module 9.1.1.4 gpio rising-edge detect register (grer) and falling-edge detect register (gfer) each gpio port can also be programmed to detect a rising-edge, falling-edge, or either transition on a pin. when an edge is detected that matches the type of edge programmed for the pin, a status bit is set. the interrupt controller can be programmed to signal an interrupt to the cpu or wake up the sa-1110 from sleep mode when any one of these status bits is set. the gpio rising-edge and falling-edge detect registers (grer and gfer, respectively) are used to select the type of transition on a gpio pin that causes a bit within the gpio edge detect status register (gedr) to be set. for a given gpio port pin, its corresponding grer bit is set to cause a gedr status bit to be set when the pin transitions from logic level zero (0) to one (1). likewise, gfer is used to set the corresponding gedr status bit when a transition from logic level one (1) to zero (0) occurs. when the corresponding bits are set in both registers, either a falling- or a rising-edge transition causes the corresponding gedr status bit to be set. the following table shows both the rising-edge and falling-edge enable bit locations corresponding to all 28 port pins. for reserved bits, writes are ignored and reads return zero; a question mark indicates that the values are unknown at reset. 0h 9004 0010 grer read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved re27 re26 re25 re24 re23 re22 re21 re20 re19 re18 re17 re16 re15 re14 re13 re12 re11 re10 re9 re8 re7 re6 re5 re4 re3 re2 re1 re0 reset 0 0 0 0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 1 1 bits name description nren gpio pin n rising-edge detect (where n = 0 through 27). 0 ? disable rising-edge detect. 1 ? set corresponding gedr status bit when a rising edge is detected on the gpio pin. 31..28 ? reserved 0h 9004 0014 gfer read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved fe27 fe26 fe25 fe24 fe23 fe22 fe21 fe20 fe19 fe18 fe17 fe16 fe15 fe14 fe13 fe12 fe11 fe10 fe9 fe8 fe7 fe6 fe5 fe4 fe3 fe2 fe1 fe0 reset 0 0 0 0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 1 1 bits name description nfen gpio pin n falling-edge detect (where n = 0 through 27). 0 ? disable falling-edge detect. 1 ? set corresponding gedr status bit when a falling edge is detected on the gpio pin. 31..28 ? reserved
sa-1110 developer ? s manual 9-7 system control module 9.1.1.5 gpio edge detect status register (gedr) the gpio edge detect status register (gedr) contains 28 status bits that correspond to the 28 gpio port pins. when an edge detect occurs on a pin that matches the type of edge programmed in the grer and/or gfer registers, the corresponding status bit is set in gedr. once a gedr bit is set, the cpu must clear it. gedr status bits are cleared by writing a one to them. writing a zero to a gedr status bit has no effect. each edge detect that sets the corresponding gedr status bit for gpio pins 0 ? 27 can trigger an interrupt request. pins 27 ? 11 together form a group that can cause one interrupt request to be triggered when any one of the gedr status bits 27 ? 11 is set. each of gpio pins 10 ? 0 causes an independent first-level interrupt. see the section 9.2, ? interrupt controller ? on page 9-11 for a description of the programming of gpio interrupts. the following table shows a summary of gedr; a question mark indicates that the values are unknown at reset. 0h 9004 0018 gedr read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved ed27 ed26 ed25 ed24 ed23 ed22 ed21 ed20 ed19 ed18 ed17 ed16 ed15 ed14 ed13 ed12 ed11 ed10 ed9 ed8 ed7 ed6 ed5 ed4 ed3 ed2 ed1 ed0 reset 0 0 0 0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? bits name description nedn gpio edge detect status n (where n = 0 through 27). 0 ? no edge detect has occurred on pin as specified in grer and/or gfer. 1 ? edge detect has occurred on pin as specified in grer and/or gfer. 31..28 ? reserved
9-8 sa-1110 developer ? s manual system control module 9.1.1.6 gpio alternate function register (gafr) the gpio alternate function register (gafr) contains 28 control bits that correspond to the 28 gpio port pins. when the processor sets a bit in the gafr, the corresponding gpio pin is switched over to that pin ? s alternate function. see the following section for details on alternate functions. this register is cleared to all zeros on all reset conditions. 0h 9004 001c gafr read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved af27 af26 af25 af24 af23 af22 af21 af20 af19 af18 af17 af16 af15 af14 af13 af12 af11 af10 af9 af8 af7 af6 af5 af4 af3 af2 af1 af0 reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 bits name description nafn gpio alternate function bits (where n = 0 through 27). a bit set in this register indicates that the corresponding gpio pin is to be used for its alternate function. a zero in this register indicates that the corresponding gpio pin is to be used for its normal gpio function. 31..28 ? reserved
sa-1110 developer ? s manual 9-9 system control module 9.1.2 gpio alternate functions most gpio pins have an alternate function that can be invoked to enable additional functionality within the sa-1110. if a gpio is used for this alternate function, then it cannot be used as a gpio at the same time. pins 0 and 1 are reserved because of their special use during sleep mode and are not available for any alternate function. the following table shows each gpio pin and its corresponding alternate function. for more details on an alternate function, see the section that corresponds to its name in the unit column in the table. ? to enable rclk_out, it is also necessary to set bits 31:29 of the test unit control register (tucr) = 0b100. see appendix d, ? internal test ? for more information about the tucr. ? the signals, treqa, treqb, and tic_ack are reserved by intel for test purposes. pin alternate function direction unit signal description gp 27 32khz_out output clocks raw 32.768-khz oscillator output gp 26 rclk_out ? output clocks internal clock/2 gp 25 rtc clock output rtc real time clock gp 24 reserved ? ? ? gp 23 treqb ? input test controller tic request b gp 22 treqa ? /mbreq input test controller either tic request a or mbreq gp 21 tic_ack ? /mbgnt output test controller either tic acknowledge or mbgnt gp 21 mcp_clk input serial port 4 mcp clock in gp 20 uart_sclk3 input serial port 3:uart sample clock input gp 19 ssp_clk input serial port 2:ssp sample clock input gp 18 uart_sclk1 input serial port 1:uart sample clock input gp 17 reserved ? ? ? gp 16 gpclk_out output serial port 1 general-purpose clock out gp 15 uart_rxd input serial port 1:uart uart receive gp 14 uart_txd output serial port 1:uart uart transmit gp 13 ssp_sfrm output serial port 4:ssp ssp frame clock gp 12 ssp_sclk output serial port 4:ssp ssp serial clock gp 11 ssp_rxd input serial port 4:ssp ssp receive gp 10 ssp_txd output serial port 4:ssp ssp transmit gp 2..9 ldd 8..15 output lcd controller high-order data pins for split-screen color lcd support gp 1 reserved ? ? no alternate function gp 0 reserved ? - ? no alternate function
9-10 sa-1110 developer ? s manual system control module 9.1.2.1 3.6864 mhz option for gp 27 alternate output function when gp 27 is configured for its alternate output function by setting bit 27 in both the gafr and gpdr, bit 29 of the test unit control register (tucr) at physical address 0x9003 0008 can be set to select the 3.6864 mhz oscillator output instead of the 32.768 khz oscillator output. when tucr 29 is cleared the 32.768 khz oscillator output is selected again. neither option provides a fixed phase relationship with any other pin signals; and some glitching may occur when switching between the two options. the 3.6864 mhz option is particularly useful for companion chips that require some clock cycles after assertion of vdd_fault or batt_fault. the oscillator output will continue through the first step of the sleep shutdown sequence, which lasts for one cycle of the power manager ? s 32.768 khz clock (~30 microseconds). thus, at least 112 cycles of 3.6864 mhz oscillation are provided prior to shutdown. see section 9.5.3 for a detailed description of sleep mode and the sleep shutdown sequence. 9.1.3 gpio register locations the following table shows the registers associated with the gpio block and the physical addresses used to access them. address name description 0h 9004 0000 gplr gpio pin-level register 0h 9004 0004 gpdr gpio pin direction register 0h 9004 0008 gpsr gpio pin output set register 0h 9004 000c gpcr gpio pin output clear register 0h 9004 0010 grer gpio rising-edge detect register 0h 9004 0014 gfer gpio falling-edge detect register 0h 9004 0018 gedr gpio edge detect status register 0h 9004 001c gafr gpio alternate function register
sa-1110 developer ? s manual 9-11 system control module 9.2 interrupt controller the sa-1110 interrupt controller provides masking capability for all interrupt sources and combines them into their final state, either an fiq or irq processor interrupt. the interrupt hierarchy of the sa-1110 is a two-level structure. the first level of the structure, represented by the interrupt controller irq pending register (icip) and the interrupt controller fiq pending register (icfp) contain the all-enabled and unmasked interrupt sources. interrupts are enabled at their source and unmasked in the interrupt controller mask register (icmr). the icip contains the interrupts that are programmed to generate an irq interrupt. the icfp contains all valid interrupts that are programmed to generate an fiq interrupt. this routing is programmed via the interrupt controller level register (iclr). the second level of the interrupt structure is represented by registers contained in the source device (the device generating the first-level interrupt bit). second-level interrupt status gives additional information about the interrupt and is used inside the interrupt service routine. in general, multiple second-level interrupts are or ? ed to produce a first- level interrupt bit. the enabling of interrupts is performed inside the source device. in most cases, the root source of an interrupt can be determined through reading two register locations: the icip or icfp (depending on which interrupt handler the software is in) to determine the interrupting device, followed by the status register within that device to find the exact function needing service. when the sa-1110 is in idle mode (see the section 9.5, ? power manager ? on page 9-26 ), any enabled interrupt causes it to resume operation. the interrupt mask is ignored during idle mode if the dim bit in the interrupt controller control register (iccr) is set to zero (0). figure 9-2 shows a block diagram of the interrupt controller. figure 9-2. interrupt controller block diagram interrupt mask register interrupt source bit interrupt level register fiq interrupt irq interrupt to processor to processor interrupt pending register fiq interrupt pending register irq interrupt pending register 31 31 all other qualified interrupt bits
9-12 sa-1110 developer ? s manual system control module 9.2.1 interrupt controller register definitions the interrupt controller contains four registers: the interrupt controller irq pending register (icip), the interrupt controller fiq pending register (icfp), the interrupt controller mask register (icmr), and the interrupt controller level register (iclr). following reset, the fiq and irq interrupts are disabled within the cpu, and the states of all of the interrupt controller ? s registers are unknown and must be initialized by software before interrupts are enabled within the cpu. 9.2.1.1 interrupt controller pending register (icpr) the icpr is a 32-bit read-only register that shows all active interrupts in the system. these bits are not affected by the state of the mask register (icmr). the following table shows the pending interrupt source assigned to each bit position in the icpr. also included in the table are the source units for the interrupts and the number of second-level interrupts associated with each. for more detail on the second-level interrupts, see the section describing that unit. bit position unit source module # of level 2 sources bit field description ip 31 system real-time clock 1 rtc equals alarm register. ip 30 1 one hz clock tic occurred. ip 29 operating system timer 1 os timer equals match register 3. ip 28 1 os timer equals match register 2. ip 27 1 os timer equals match register 1. ip 26 1 os timer equals match register 0. ip 25 peripheral dma controller 3 channel 5 service request. ip 24 3 channel 4 service request. ip 23 3 channel 3 service request. ip 22 3 channel 2 service request. ip 21 3 channel 1 service request. ip 20 3 channel 0 service request. ip 19 serial port 4b 3 ssp service request. ip 18 serial port 4a 8 mcp service request. ip 17 serial port 3 6 uart service request. ip 16 serial port 2 6+6 uart/hssp service request. ip 15 serial port 1b 6 uart service request. ip 14 reserved ? reserved. ip 13 serial port 0 6 udc service request. ip 12 lcd controller 12 lcd controller service request.
sa-1110 developer ? s manual 9-13 system control module several units have more than one source per interrupt signal. when an interrupt is signalled from one of these units, the interrupt handler routine identifies which interrupt was signalled using the interrupt controller ? s flag register (this identifies the unit that made the request, but not the exact source). the handler then reads the interrupting unit ? s status register to identify which source within the unit signalled the interrupt. for all interrupts that have one corresponding source, the interrupt handler routine needs to use only the interrupt controller ? s registers to identify the exact cause of the interrupt. ip 11 system general-purpose i/o 17 ? or ? of gpio edge detects 27-11. ip 10 1 gpio 10 edge detect. ip 9 1 gpio 9 edge detect. ip 8 1 gpio 8 edge detect. ip 7 1 gpio 7 edge detect. ip 6 1 gpio 6 edge detect. ip 5 1 gpio 5 edge detect. ip 4 1 gpio 4 edge detect. ip 3 1 gpio 3 edge detect. ip 2 1 gpio 2 edge detect. ip 1 1 gpio 1 edge detect. ip 0 1 gpio 0 edge detect. total level 2 interrupt sources 110 bit position unit source module # of level 2 sources bit field description
9-14 sa-1110 developer ? s manual system control module 9.2.1.2 interrupt controller irq pending register (icip) and fiq pending register (icfp) the icip and the icfp contain one flag per interrupt (32 total) that indicates an interrupt request has been made by a unit. inside the interrupt service routine, the icip and icfp are read to determine the interrupt source. in general, software then reads status registers within the interrupting device to determine how to service the interrupt. bits within the icpr are read only, and represent the logical or of status bits for a given interrupt within the source unit. once an interrupt has been serviced, the handler clears the pending interrupt at the source by writing a one to the necessary status bit. clearing the interrupt status bit at the source automatically clears the corresponding icip and icfp flag provided there are no other interrupt status bits set within the source unit. all interrupt source status bits are cleared by writing a one to them. writing a zero to an interrupt status bit has no effect. the following table shows the bit locations corresponding to the 32 separate interrupt pending status flags in the icip. the next table shows the bit locations corresponding to the 32 separate interrupt pending status flags in the icfp. this is a read-only register. 0h 9005 0000 icip read-only 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ip31 ip30 ip29 ip28 ip27 ip26 ip25 ip24 ip23 ip22 ip21 ip20 ip19 ip18 ip17 ip16 ip15 ip14 ip13 ip12 ip11 ip10 ip9 ip8 ip7 ip6 ip5 ip4 ip3 ip2 ip1 ip0 bits name description 31..0 ? these flags reflect the or of the reset state of the individual interrupt status bits at the source unit. 0h 90005 0010 icfp read-only 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 fp31 fp30 fp29 fp28 fp27 fp26 fp25 fp24 fp23 fp22 fp21 fp20 fp19 fp18 fp17 fp16 fp15 fp14 fp13 fp12 fp11 fp10 fp9 fp8 fp7 fp6 fp5 fp4 fp3 fp2 fp1 fp0 bits name description 31..0 ? these flags reflect the or of the reset state of the individual interrupt status bits at the source unit.
sa-1110 developer ? s manual 9-15 system control module 9.2.1.3 interrupt controller mask register (icmr) the interrupt controller mask register (icmr) contains one mask bit per pending interrupt bit (32 total). the mask bits control whether a pending interrupt bit will generate a processor interrupt (irq or fiq). when a pending interrupt becomes active, it is sent to the cpu only if its corresponding icmr mask bit is set to a one. note: when the dim bit in the interrupt controller control register (iccr) is set to a 0 the mask bits are ignored when the sa-1110 is in idle mode. while in idle, if any interrupt source makes a request, the corresponding pending bit is set and the interrupt automatically becomes active, regardless of the state of its mask bit. mask bits serve two purposes. first, they allow periodic software polling of interruptible sources while preventing them from actually causing an interrupt. second, they allow the interrupt handler routine to prevent interrupts of lower priority from occurring while still maintaining a list of pending interrupts that may have occurred previously (or during the servicing of another interrupt). the icmr is not initialized at reset; a question mark indicates that the values are unknown at reset. the following table shows the bit locations corresponding to the 32 separate interrupt mask bits. 0h 9005 0004 icmr read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 im31 im30 im29 im28 im27 im26 im25 im24 im23 im22 im21 im20 im19 im18 im17 im16 im15 im14 im13 im12 im11 im10 im9 im8 im7 im6 im5 im4 im3 im2 im1 im0 reset ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? bits name description nimn interrupt mask n (where n = 0 through 31). 0 ? pending interrupt is masked from becoming active (interrupts not sent to cpu, power manager). 1 ? pending interrupt is allowed to become active (interrupt sent to cpu, power manager). note : im bits are ignored during idle mode.
9-16 sa-1110 developer ? s manual system control module 9.2.1.4 interrupt controller level register (iclr) the interrupt controller level register (iclr) controls whether a pending interrupt generates an fiq or an irq cpu interrupt. if a pending interrupt is unmasked, the corresponding iclr bit field is decoded to select which cpu interrupt should be asserted. if the interrupt is masked, then the corresponding bit in the iclr has no effect. the following table shows the location of all interrupt level bits in the iclr; question marks indicate that the values are unknown at reset. 0h 9005 0008 iclr read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 il31 il30 il29 il28 il27 il26 il25 il24 il23 il22 il21 il20 il19 il18 il17 il16 il15 il14 il13 il12 il11 il10 il9 il8 il7 il6 il5 il4 il3 il2 il1 il0 reset ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? bits name description niln interrupt level n (where n = 0 through 31). 0 ? interrupt routed to cpu irq interrupt input. 1 ? interrupt routed to cpu fiq interrupt input.
sa-1110 developer ? s manual 9-17 system control module 9.2.1.5 interrupt controller control register (iccr) the interrupt controller control register (iccr) contains a single control bit, the disable idle mask bit (dim). when set, this bit inhibits the idle mode operation where the output of the icmr is or ? ed to all ones. if this bit is set, then the interrupts that are capable of bringing the sa-1110 out of idle mode are defined by the contents of the icmr. the following table shows the location of all interrupt level bits in the iccr. 0h 9005 000c iccr read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved dim reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ? 0 0 0 0 0 0 0 0 0 0 0 0 bits name description 0dim disable idle mask. 0 ? all enabled interrupts will bring the sa-1110 out of idle mode. 1 ? only enabled and unmasked (as defined in the icmr) will bring the sa-1110 out of idle mode. this bit is cleared during all resets. 31..1 ? reserved
9-18 sa-1110 developer ? s manual system control module 9.2.2 interrupt controller register locations the following table shows the registers associated with the interrupt controller block and the physical addresses used to access them. 9.3 real-time clock the sa-1110 contains a real-time clock (rtc) that provides a general-purpose real-time reference for use by the system. the rtc is uninitialized after a hardware reset (nreset) and must be written by the user to the desired value. thereafter, the counter will remain valid until another hardware reset (assumed to be infrequent). the value of the counter is unaffected by transitions into and out of sleep, idle, software reset, or a watchdog reset. the counter is incremented on rising edges of the 1-hz clock. in addition to the counter [ rtc counter register (rcnr) ], the rtc incorporates a 32-bit alarm register (rtar). the rtar may be programmed with a value to be compared against the counter. on each rising edge of the 1-hz clock, the counter is incremented and then compared to the rtar. if the values match, then a status bit is set. this status bit is also routed to the interrupt controller and may be programmed to generate a cpu interrupt. another interruptible status bit is available that is set whenever the 1 hz clock ticks. each status bit may be cleared by writing a one to the status register in the desired bit position. the 1-hz clock is generated by dividing down the 32.768-khz crystal oscillator output. this divider logic is programmable to allow the user to ? trim ? the counter to adjust for inherent inaccuracies in the crystal ? s frequency. this trimming mechanism permits the user to adjust the rtc to an accuracy of +/- 5 seconds per month. the trimming procedure is described later in this section. 9.3.1 rtc counter register (rcnr) the rtc counter register (rcnr) is a read/write register and is not cleared by any reset source. the counter may be written by the processor at any time although it is recommended that the operating system prevent inadvertent writes to the rcnr through the use of the mmu protection mechanisms. because of the asynchronous nature of the 1-hz clock relative to the processor clock, writes to this counter are controlled by a hardware mechanism that delays the actual write to the counter by up to one 32-khz-clock (~ 30 s) after the processor store is performed. after the processor writes to the rcnr, all other writes to this register location are ignored until the new value is actually loaded into the counter. the rcnr may be read at any time. reads reflect the value in the counter immediately after it increments or loads. address name description 0h 9005 0000 icip interrupt controller irq pending register 0h 9005 0004 icmr interrupt controller mask register 0h 9005 0008 iclr interrupt controller level register 0h 9005 0010 icfp interrupt controller fiq pending register 0h 9005 0020 icpr interrupt controller pending register 0h 9005 000c iccr interrupt controller control register
sa-1110 developer ? s manual 9-19 system control module 9.3.2 rtc alarm register (rtar) the real-time clock alarm register is a 32-bit register that is readable and writable by the processor. following each rising edge of the 1-hz clock, this register is compared to the rcnr. if the two are equal and the enable bit is set, then the alarm bit in the rtc status register is set. the value in this register is undefined after the assertion of nreset. 9.3.3 rtc status register (rtsr) the following table shows the location of all bits in the rtsr. all reserved bits are read as zeros and are unaffected by writes; a question mark indicates that the value is unknown at reset. the al and hz bits in this register are routed to the interrupt controller where they may be enabled to cause an interrupt. the al and hz bits are cleared by writing ones to them. 0h 9001 0010 rtsr read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved hze ale hz al reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ? ? ? ? bits name description 0al rtc alarm detected. 0 ? no alarm has been detected. 1 ? an alarm has been detected (rtnr matched rtar). 1hz 1-hz rising-edge detected. 0 ? no rising-edge has been detected. 1 ? a rising-edge has been detected. 2ale rtc alarm interrupt enable. 0 ? the rtc alarm interrupt is not enabled. 1 ? the rtc alarm interrupt is enabled. 3hze 1-hz interrupt enable. 0 ? the 1-hz interrupt is not enabled. 1 ? the 1-hz interrupt is enabled. 31..4 ? reserved
9-20 sa-1110 developer ? s manual system control module 9.3.4 rtc trim register (rttr) program the rttr to select the frequency of the real time clock (rtc). if this register is not programmed and left at its reset value (all zeros), then the rtc will actually be running at 32.768 khz. refer to section 9.5.7.8, ? power manager oscillator status register (posr) ? on page 9-41 to understand when the real time clock is stable. refer to section 9.3.5.2, ? rttr value calculations ? on page 9-21 for details on how to calculate the value of the rttr. the following table shows the location of all bits in the rttr. all reserved bits are read as zeros and are unaffected by writes. 9.3.5 trim procedure the 1-hz clock feeding the rtc is obtained by dividing the output of the 32.768-khz oscillator down. since 32768 is a power of two, a 15-bit divider will generate a 1-hz clock (given a perfect crystal and perfect board environment). the inherent inaccuracies of crystals, aggravated by varying capacitance of the board connections, and so on, cause the timebase to be somewhat inaccurate, requiring a periodic adjustment in the 1 hz clock period. the sa-1110, through the rttr, allows the user to adjust or "trim" the 1 hz timebase to an accuracy of +/- 5 seconds per month. at reset, the rttr contains zeros that disable the trim circuitry. when the trim circuitry is disabled, the 1-hz clock feeding the rtc is the same frequency as the output of the 32.768-khz oscillator. the rttr is reset to all zeros each time the nreset signal is asserted. 9.3.5.1 oscillator frequency calibration to generate the value to be entered into the rttr, the user must first measure the output frequency of the 32.768-khz oscillator using an accurate timebase, such as a frequency counter. this clock is made externally visible by selecting the alternate function for gpio 27. to gain access to the clock, this pin must be programmed as an output and then switched over to the alternate function. see the section 9.1, ? general-purpose i/o ? on page 9-1 in this chapter for details on how to gain access to the clock. the trim is accomplished by dividing the output of the oscillator by an integer value and then doing fine-grain fractional adjustment by periodically deleting clocks from the stream feeding this integer divider. 0h 9001 0008 rttr read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved trim delete count clock divider count reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 bits name description 15..0 c15..c0 clock divider count. this value is the integer portion of the clock trim logic. 25..16 d9..d0 trim delete count. this value represents the number of 32-khz clocks to delete when clock trimming begins. 31..26 ? reserved
sa-1110 developer ? s manual 9-21 system control module 9.3.5.2 rttr value calculations after the true frequency of the oscillator is known, it must be split into integer and fractional portions. the integer portion of the value (minus one) is loaded into the c0-c15 field of the rttr. this value is compared against a 16-bit counter clocked by the output of the 32.768-khz oscillator. the counter resets and generates a pulse when the two values are equal. this pulse constitutes the raw 1-hz signal. the fractional part of the adjustment is done by periodically deleting clocks from the clock stream feeding the integer counter. the period, called the "trim interval," is hard ? wired to be 2 10 -1 seconds (approximately 17 minutes). the number of clocks deleted, called the "trim delete value," is a 10-bit programmable counter allowing from 0 to 2 10 -1 32-khz clocks to be deleted from the input clock stream once per trim interval. d0-d9 represents the number of clocks deleted per trim operation. in summary, every 2 10 -1 seconds, the integer counter stops clocking for a period equal to the fractional error that has accumulated. if this counter is programmed to a zero (as it is at a hard reset), then no trim operations will occur and the rtc will be clocked with the raw 32.768-khz clock. the relationship between the nominal 1-hz clock frequency and the nominal 32.768-khz clock (f1 and f32k respectively) is shown in the following equation. trim example #1 ? measured value has no fractional component in this example, the oscillator output is measured to be 36045.000 cycles/s (hz). this output is exactly 3277 cycles over the nominal frequency of the crystal and has no fractional component. as such, only the integer trim function is needed and no fractional trim is required. accordingly, the c0-c15 field of the rttr is loaded with the binary equivalent of 36045-1, or 0x8ccc. the d0-d9 field is left at zero (power-up state) to disable fractional trimming. this trim exercise leaves an error of zero in trimming. trim example #2 ? measured value has a fractional component this example is a more common case in that the measured frequency of the oscillator has a fractional component. if the oscillator output is measured to be 32768.92 cycles/s (hz), an integer trim is necessary so that the average number of cycles counted before generating one 1-hz clock is 32768.92. similar to the previous example, the integer field d0-d15 is loaded with the hexadecimal equivalent of 32768-1 or 0x7fff. because the actual clock frequency is 0.92 cycles per second faster than the integer value, the 1-hz clock generated by just the integer trimming is slightly faster than needed and must be slowed down. accordingly, the fractional trim must be programmed to delete 0.92 cycles per second on average to bring the 1-hz output frequency down to the proper value. since the trimming procedure is performed only every 2 10 -1=1023 seconds, the trim must be set to delete (.92*1023) = 941.16 clocks every 1023 seconds. the fractional component of this value cannot be trimmed out and constitutes the error in trimming, described below. the counter should be loaded with the hexadecimal equivalent of 941, or 0x3ad. f1= (2^10-1)*(c 15..0 +1) -d 9..0 (2^10-1)*(c 15..0 +1) * f32k (c 15..0 +1)
9-22 sa-1110 developer ? s manual system control module this trim setting leaves an error of .16 cycles per 1023 seconds. the error calculation yields (in parts-per-million or ppm): maximum error calculation versus real-time clock accuracy as seen from trim example #2, the maximum possible error approaches 1 clock per 2 10 -1 seconds. calculating the ppm error for this scenario yields: to maintain an accuracy of +/- 5 seconds per month, the required accuracy is calculated to be: this calculation indicates that the accuracy of the sa-1110 trim mechanism is more than adequate to compensate for the static environmental and manufacturing variables, and still provides acceptable accuracy. 9.3.6 real-time clock register locations the following table describes the real-time clock registers. 9.4 operating system timer the sa-1110 contains a 32-bit operating system timer that is clocked by the 3.6864-mhz oscillator. the operating system count register (oscr) is a free-running up-counter that is not cleared during any reset (contains unknown value after reset). the os timer also contains four 32-bit match registers (osmr 3:0). each register can be written and read by the user. when the value in the oscr matches (is equal to) the value within any of the match registers, and the interrupt enable bit is set, the corresponding bit in the ossr is set. these bits are also routed to the interrupt controller where they can be programmed to cause an interrupt. osmr 3 also serves as a watchdog match register that resets the sa-1110 when a match occurs. the only register that is reset to a known state is the watchdog match enable register (wmer). the user must initialize all other registers and clear any set status bits before the fiq and irq interrupts are enabled within the cpu. error 0.16 cycles 1023 sec -------------------------- - x 1 sec 32768 cycles ------------------------------- 0 . 0 0 2 p p m == error (maximum) 1 cycle 1023 sec -------------------- - x 1 sec 32768 cycles ------------------------------- 0 . 0 3 p p m == error 5 sec month -------------- - x 1 month 2592000 sec ----------------------------- - 1.9 ppm == address name description 0h 9001 0000 rtar rtc alarm register 0h 9001 0004 rcnr rtc count register 0h 9001 0008 rttr rtc timer trim register 0h 9001 0010 rtsr rtc status register
sa-1110 developer ? s manual 9-23 system control module 9.4.1 os timer count register (oscr) the os timer count register is a 32-bit counter that increments on rising edges of the 3.6864-mhz clock. this counter can be read or written at any time. it is recommended that the system write-protect this register through the mmu protection mechanisms. 9.4.2 os timer match registers 0 ? 3 (osmr 0, osmr 1, osmr 2, osmr 3) these registers are 32 bits wide and are readable and writable by the processor. they are compared against the oscr following every rising edge of the 3.6864-mhz clock. if any of these registers match the counter at this time, then the corresponding status bit in the ossr is set. the status bits are routed to the interrupt controller where they can be unmasked to cause a cpu interrupt. osmr 3 may also serve as a watchdog timer. see the section 9.4.6, ? watchdog timer ? on page 9-25 for operation information. 9.4.3 os timer watchdog match enable register (ower) the watchdog enable register contains a single control bit (bit 0) that enables the watchdog function. this bit is set by writing a one to it. it can only be cleared by one of the reset functions (hardware reset, software reset) and by entering sleep mode. a watchdog reset also clears the watchdog enable bit. the format of this register follows: 0h 9000 0018 ower read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved wme reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 bits name description 0wme watchdog match enable. 0 ? os timer match register 3 matches cause an interrupt request. 1 ? os timer match register 3 matches cause a reset of the sa-1110 . note : this is a write-once bit that once written, can only be changed after a hardware (pin), software (swr), or sleep mode reset. 31..1 ? reserved
9-24 sa-1110 developer ? s manual system control module 9.4.4 os timer status register (ossr) this status register contains status bits indicating whether a match has occurred on any of the four match registers. these bits are set when the event occurs (following the rising edge of the 3.6864-mhz clock) and cleared by writing a one to the proper bit position. writing zeros to this register has no effect. all reserved bits read as zeros and are unaffected by writes; a question mark indicates that the value is unknown at reset. 0h 9000 0014 ossr read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved m3 m2 m1 m0 reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ? ? ? ? bits name description 0m0 match status channel 0. 0 ? os timer match register 0 has not matched the os timer counter since the last clear. 1 ? os timer match register 0 has matched the os timer counter. 1m1 match status channel 1. 0 ? os timer match register 1 has not matched the os timer counter since the last clear. 1 ? os timer match register 1 has matched the os timer counter. 2m2 match status channel 2. 0 ? os timer match register 2 has not matched the os timer counter since the last clear. 1 ? os timer match register 2 has matched the os timer counter. 3m3 match status channel 3. 0 ? os timer match register 3 has not matched the os timer counter since the last clear. 1 ? os timer match register 3 has matched the os timer counter. 31..4 ? reserved
sa-1110 developer ? s manual 9-25 system control module 9.4.5 os timer interrupt enable register (oier) this register contains four enable bits indicating whether a match between one of the match registers and the os timer counter will set a status bit in the ossr. each match register has a corresponding enable bit. clearing an enable bit does not clear the corresponding interrupt status bit if that bit is already set. 9.4.6 watchdog timer osmr 3 may also serve as a watchdog compare register. this function is enabled by setting bit 0 in the ower. when a compare against this register occurs when the watchdog is enabled, reset is applied to the sa-1110 and most internal states are cleared (with exceptions listed below). internal reset is asserted for 256 processor clocks and then removed, allowing the sa-1110 to boot. units that do not receive this internal reset are: the power manager, the refresh timer, and the pll configuration. watchdog reset affects the sa-1110 similar to a software reset. see the section 9.6, ? reset controller ? on page 9-42 for details on what is affected by each kind of reset. when the sa-1110 comes out of a watchdog reset, a bit is set in the reset controller status register (rcsr) to indicate that the event happened. the following procedure is suggested when using osmr 3 as a watchdog: each time the operating system services the register, the current value of the counter is read, and a number is then added to the value read, corresponding to the amount of time before the next timeout (care must be taken to account for counter wrap ? around). this number is then written back to osmr 3. the os code must repeat this procedure periodically before each match occurs. if the match occurs, the os timer will assert a reset. 0h 9000 001c oier read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved e3 e2 e1 e0 reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 bits name description 0e0 interrupt enable channel 0. this bit is set by software and allows a match between match register osmr[0] and the os timer to assert interrupt bit m0 in the ossr. 1e1 interrupt enable channel 1. this bit is set by software and allows a match between match register osmr[1] and the os timer to assert interrupt bit m1 in the ossr. 2e2 interrupt enable channel 2. this bit is set by software and allows a match between match register osmr[2] and the os timer to assert interrupt bit m2 in the ossr. 3e3 interrupt enable channel 3. this bit is set by software and allows a match between match register osmr[3] and the os timer to assert interrupt bit m3 in the ossr. 31..4 ? reserved
9-26 sa-1110 developer ? s manual system control module 9.4.7 os timer register locations table 9-1 shows the registers associated with the os timer and the physical addresses used to access them. 9.5 power manager the sa-1110 contains power management logic that controls the transition between three different modes of operation: run, idle, and sleep. these modes are used to reduce processor power consumption at times when some functions are not needed, or when the system ? s power supply is low or out of regulation. each of the respective modes is associated with a reduced level of power consumption. idle mode is entered via software. sleep mode is entered either via software or by asserting one of two input pins that indicate a power supply fault. idle mode is exited through an interrupt. sleep mode is exited through a preprogrammed wake-up condition. both modes may be exited in extreme cases via hardware reset. if none of the power management modes is active and the sa-1110 is out of reset, then it is said to be in run mode. 9.5.1 run mode run mode is the normal operating mode of the sa-1110: all power supplies are enabled, all clocks are running, and every on-chip resource is functional. this is the normal state of operation for the processor while it is executing code. under usual conditions, the processor enters run mode after successful power-up and reset of the part. 9.5.2 idle mode idle mode allows a software application to stop the cpu when not in use, while continuing to monitor interrupt service requests both on or off-chip. when an interrupt occurs, the cpu is reactivated. during idle mode, the scm, pm, and mpcm are each fully operational. in idle mode, the cpu clock is stopped. since the sa-1110 is static, all cpu state information is saved. this allows the part to be switched back to run mode, starting operation exactly where it left off. during idle mode, all other on-chip resources are active, including: all system unit modules (real-time clock, operating system timer, interrupt controller, general-purpose i/o, and power table 9-1. os timer register locations address name description 0h 9000 0000 osmr 0 os timer match registers 3:0 0h 9000 0004 osmr 1 0h 9000 0008 osmr 2 0h 9000 000c osmr 3 0h 9000 0010 oscr os timer counter register 0h 9000 0014 ossr os timer status register 0h 9000 0018 ower os timer watchdog enable register 0h 9000 001c oier os timer interrupt enable register
sa-1110 developer ? s manual 9-27 system control module manager); all peripheral unit modules (dma controller, lcd controller, serial controller 0-4); and all memory controller resources. the pll also remains in lock so that the part can be brought out of idle mode quickly when an interrupt occurs. 9.5.2.1 entering idle mode idle mode is entered while in run mode by executing a three instruction sequence consisting of the privileged on-chip coprocessor 15 instruction ? disable clock switching ? , a load from a noncacheable memory location (c=b=0), and the privileged on-chip coprocessor 15 instruction ? wait for interrupt ? . this sequence must reside in the first three words of an instruction cache line, which requires that the linker align the idle mode instruction sequence on an eight word boundary. idle mode is entered by following the exact code sequence: area ? idle$$code ?, code, readonly, align=5 ;aligned to 8 word boundary ;p15 = coprocessor 15 ;r0 = register 0 (contents not used) ;c15 = test, clk, and idle cntl register ;c2 = crm = 0b0010 mcr p15, 0, r0, c15, c2, 2 ;2 = opc_2 = 0b010 ldr r0, [r1] ; r1 points to non-cachable mem loc mcr p15, 0, r0, c15, c8, 2 ;c8 = crm = 0b1000 9.5.2.2 exiting idle mode any enabled interrupt from the system unit or peripheral unit causes a transition from idle mode back to run mode. an interrupt is masked or unmasked using the interrupt controller mask register (icmr). the dim (disable idle mask) bit in the interrupt controller control register (iccr) controls which enabled interrupts bring the sa-1110 out of idle mode.  when dim=0, the icmr register is ignored. any enabled interrupt, masked or unmasked, brings the sa-1110 out of idle mode.  when dim=1, the icmr register is not ignored. interrupts that are specifically enabled and unmasked bring the sa-1110 out of idle mode. note: refer to section 9.2.1.5, ? interrupt controller control register (iccr) ? on page 9-17 for detailed information on the iccr disable idle mask bit. when an interrupt occurs, the cpu clocks are reactivated, the wait-for-interrupt instruction is completed, and run-program flow resumes. if the interrupt bringing the sa-1110 out of idle mode is masked, program flow resumes in a linear fashion. if the interrupt bringing the sa-1110 out of idle mode is unmasked, program flow resumes as in any other interrupt service routine. you must reenable clock switching for both circumstances. a transition from idle to run mode also occurs when asserting the nreset pin, or if osmr 3 is configured as a watchdog and a match occurs that causes the assertion of reset. since the watchdog timer (when enabled) is functional during idle, you must set the watchdog match register far enough in advance to ensure that another interrupt is guaranteed to bring the sa-1110 out of idle before the watchdog reset occurs. it is recommended that either an rtc alarm or another os timer channel be used for this purpose.
9-28 sa-1110 developer ? s manual system control module note: when in idle mode, if the batt_fault and/or vdd_fault pins are asserted, the sa-1110 enters sleep mode. 9.5.3 sleep mode sleep mode offers the greatest power savings and, consequently, the lowest level of available functionality. in the transition from run or idle to sleep mode, the sa-1110 performs an orderly shutdown of on-chip activity, applies an internal reset to the processor, and then negates the pwr_en pin indicating to the external system that the vddi (1.5-v supply) should be driven to zero volts. internally, this switches off the power to the majority of the processor at this time. (the vddx i/o voltage supply must remain powered during sleep.) running off the 32.768-khz crystal oscillator, the sleep state machine watches for a preprogrammed wake-up event to occur, after which it asserts pwr_en (to reestablish the vddi power supply), and steps through an orderly wake-up sequence. when the power supply and clocks are stable, the power manager brings the sa-1110 out of reset. status bits in the reset controller status register (rcsr) may be read to indicate to software that the reset was due to sleep mode. 9.5.3.1 cpu preparation for sleep mode in preparation for sleep mode, software initializes the power manager gpio sleep state register (pgsr) and the power manager wake-up enable register (pwer). also, the gpio falling-edge detect and gpio rising-edge detect enable registers (gfer and grer) should be written with the appropriate values. the opde bit in the power manager configuration register (pcfr) should also be programmed with the desired value. 9.5.3.2 events causing entry into sleep mode sleep mode is entered in one of two ways: through software control or a power supply fault. entry into sleep mode through software is accomplished by setting the force sleep bit in the power manager control register (pmcr). this bit is set by software and cleared by hardware during sleep. when the sa-1110 wakes up from sleep, this bit is already cleared. entry into sleep via a power supply fault is caused by the assertion of either the vdd_fault or batt_fault pins. the vdd_fault pin should be used to indicate that the main power supply is out of regulation. the batt_fault pin should be used to indicate that the battery has been removed or is low. these pins have identical operation for the purpose of entering sleep mode. they have different implications during the wake-up sequence as described in the following section. 9.5.3.3 the sleep shutdown sequence the sleep state machine begins the shutdown sequence. this sequence consists of three steps.  in the first step, the following actions occur: a. power manager switches the gpio output pins to their sleep state. this sleep state is programmed in advance by loading the power manager gpio sleep state register (pgsr) into the gpio output data register. (see the section 9.1, ? general-purpose i/o ? on page 9-1 .) b. the drams are placed into self-refresh mode. the memory controller finishes whatever memory operation might be in progress, issues a self-refresh command to sdram, and drives the nras/nsdcs 3:0 and ncas/dqm 3:0 pins low.
sa-1110 developer ? s manual 9-29 system control module c. if the sleep sequence was entered due to the assertion of vdd_fault or batt_fault, the possible wake-up sources are reset from what was programmed by software to their "fault state". the fault state is to allow a transition only on gp 0 and gp 1 to act as a wake-up event.  in the second step of sleep shutdown, the following actions occur: a. all potential wake-up sources are cleared. this involves clearing all the gpio edge detect status bits and clearing the rtc alarm interrupt bit. these bits are cleared to prevent latent status bits from causing an immediate wake-up. this functionality is provided to cover the situation of entering sleep due to a power fault because the cpu does not have the ability to prepare for the entry into sleep. b. an internal reset is applied to the sa-1110. all units are reset and the reset_out pin is asserted.  in the third step of sleep shutdown, the following actions occur: a. the 3.686-mhz oscillator is stopped. this action is dependent on the state of the oscillator power-down enable bit (opde) in the power manager configuration register (pcfr). if this bit is set, then the oscillator is stopped during sleep, resulting in greater power savings. if the bit is cleared (the power-on reset state), then the oscillator continues to run during sleep and results in a faster wake-up sequence. b. the pwr_en pin is negated. the external system must respond to this negation by disabling the vddi power supply. in contrast to the sa-110, the sa-1110 systems are not required to drive vddi to zero volts in sleep. however, the power supply should be disabled to prevent power consumption. each step in the sleep shutdown sequence takes one cycle of the 32.768-khz clock (~30 microseconds). 9.5.3.4 during sleep mode during sleep mode, the sa-1110 watches for preprogrammed wake-up events. these events are either programmed by the cpu prior to setting the force sleep bit or by the power manager when a fault condition is detected. 9.5.3.5 the sleep wake-up sequence when a valid wake-up event is detected and there is no batt_fault, the sa-1110 begins a wake-up sequence. if batt_fault is asserted, then the wake-up event is ignored. vdd_fault is always ignored at this time because the vddi supply is disabled at this time. the wake-up sequence occurs in three steps.  in the first step of the wake-up sequence, the following actions occur: a. the pwr_en pin is asserted, indicating that the external supply must apply power on the vddi pins. b. an internal timer begins to time the power ramp. this timer waits for approximately 10 ms. c. the 3.686-mhz oscillator is enabled for operation if it was originally programmed to be disabled. d. if batt_fault is asserted at any time during the sleep wake-up sequence, the power manager transitions back to sleep mode through the fault state.
9-30 sa-1110 developer ? s manual system control module  in the second step of the wake-up sequence (after the power ramp timer has expired), the following actions occur: a. a second internal timer begins to time the 3.686-mhz oscillator as it begins to ramp up to speed. this timer waits for 150 ms. if the opde bit in the pcfr is zero, then the oscillator was never disabled and this timer is not used. in this case, the power manager transitions to the third step directly without waiting for the oscillator timer to complete. b. if batt_fault or vdd_fault is asserted at any time during the oscillator ramp, the power manager transitions back to sleep mode through the fault state.  in the third step of the wake-up sequence (after the 3.6864-mhz oscillator is stabilized), the following actions occur: a. the sa-1110 internal reset is negated and the cpu begins a normal boot sequence. b. the reset_out pin is negated, indicating that the sa-1110 is about to perform a fetch from the reset vector location. during the fault state entered through the assertion of vdd_fault or batt_fault, the following actions occur:  all potential wake-up sources are cleared (all gpio edge detects and the rtc alarm interrupt).  the power manager wake-up source register (pwer) is loaded with 0x0000 0003 and bits 0 and 1 of the gfer and the grer (see the section 9.1, ? general-purpose i/o ? on page 9-1 ) are set. this limits the potential wake-up sources to a rising or falling edge on gp 0 or gp 1. this wake-up fault state is provided to prevent spurious events from causing an unwanted wake-up during a low battery or shorted power supply situation. this fault state setting of pwsr, grer, and gfer registers is also the default state of the registers after a hardware reset. 9.5.3.6 booting after sleep mode when the sa-1110 boots after sleep mode (or at any other time), it must examine the reset controller status register (rcsr) to determine why it just booted. this register has bits to indicate sleep reset, software reset, watchdog reset, or hardware reset (assertion of nreset). see section 9.6, ? reset controller ? on page 9-42 for more details on reset. next, software should examine the power manager sleep status register (pssr) to determine why it was in sleep. this register has bits to indicate whether a vdd_fault, batt_fault, or force sleep bit has been asserted since the register was last cleared. it is possible for multiple bits to be set in this register. also, the sa-1110 provides the power manager scratch pad register (pspr) for saving any general processor state during sleep. this register may be written by the processor and the contents will survive sleep mode. the bits in this register are not explicitly used by the sa-1110, but may be used by software to index into rom space to retrieve memory controller configuration, for example. note: the nreset pin must not be asserted during sleep mode if the dram contents are to be preserved. the assertion and subsequent negation of nreset during sleep mode causes the sa-1110 to clear the fs bit in the force sleep register, assert pwr_en, time the pll lock
sa-1110 developer ? s manual 9-31 system control module sequence, and subsequently negate the internal reset signal. this causes the sa-1110 to perform a normal boot sequence because all information about the previous sleep state is lost. 9.5.3.7 reviving the drams from self-refresh mode because the drams are placed in self refresh prior to the sleep mode shutdown, their contents are preserved during sleep. after exiting sleep, software must reconfigure the dram control registers, which lost power during sleep mode, and then take the drams out of self-refresh mode. clearing the dram hold (dh) bit in the power management status register (pmsr) will cause the nras/nsdcs 3:0 and ncas/dqm 3:0 pins to return to the negated state (high) in preparation for a dram access. in addition to clearing pmsr:dh, bringing sdram out of self-refresh requires that the sdram controller be transitioned from a self-refresh and clock-stop state to an idle state. this involves successive writes to the dram refresh control register (mdrefr) to set one or both sdram clock run bits (k1run and/or k2run) and to set the sdram clock enable bit (e1pin). see the chapter 10, ? memory and pcmcia control module ? for details. 9.5.4 notes on power supply sequencing on the sa-1110, as on the sa-110, it is important that vddx (3.3 v nominal) power-up occur before vddi (1.5 v nominal). one approach to ensuring this sequencing is to power the 1.5-v supply using the 3.3-v supply. on the sa-1110, a second simple option is available. if the pwr_en output is used to enable the 1.5-v supply, the sa-1110 will enforce the required sequencing by holding pwr_en deasserted until the 3.3-v supply is sufficiently high. 9.5.5 assumed behavior of an intel ? strongarm sa-1110 system in sleep mode the assumed model of an sa-1110 system in sleep mode is one in which the system is relatively quiet. in particular, there should be no gratuitous switching on of the sa-1110 input pins. although there will be some switching in gpios to bring the processor out of sleep and potentially on the vdd_fault and batt_fault pins, the switching is a low-frequency activity and usually brings the sa-1110 out of sleep mode. the major concern is for power dissipation in sleep and requirements for the power supplies on the processor during sleep. the sa-1110 generates these supplies using several on-chip regulators with limited current capacity. excessive activity on-chip pins might load these regulators beyond their capacity and result in droop of the on-chip supplies. one example is that of a component tied to one of the gpio pins that constantly transmits to the processor. if the system design indicated that activity from this detector should not bring the sa-1110 out of sleep, the transitions from this gpio might result in switching in the processor that would exceed the sleep current limit. this concern exists regardless of whether the gpio is enabled as a wake-up source. figure 9-3 shows the three power-related modes of the sa-1110 and the actions that cause transitions between the modes.
9-32 sa-1110 developer ? s manual system control module table 9-2 summarizes what power and clock supplies are used by each module within the sa-1110, as well as the status of the power and clock supplies to each unit during each of the three power-related modes. figure 9-3. transitions between modes of operation idle run sleep power on, nreset asserted nreset negated force sleep bit set, or vdd or battery fault pins asserted wait for interrupt instruction wait for wake-up event system or peripheral unit interrupt cpu clock held low; all other resources active, wait for interrupt gpio or rtc alarm interrupt vdd or battery fault pins asserted nreset asserted nreset asserted hardware reset nreset asserted
sa-1110 developer ? s manual 9-33 system control module 9.5.6 pin operation in sleep mode the sa-1110 pins are categorized by the following types based on their behavior during sleep mode:  type 1 ? these pins are outputs and are driven low during sleep. these pins hold their state after sleep mode is exited until the dram_control_hold bit in the pssr is cleared.  type 1b ? these pins are outputs and are driven low during sleep. these pins are actively driven immediately after sleep mode is exited.  type 2 ? these pins are outputs and are normally driven to a one in sleep. to support systems that power down external devices, these pins can also be tristated in sleep through the use of the float_static and float_pcmcia bits in the pcfr. see the section 9.5, ? power manager ? on page 9-26 .  type 2b ? these pins are outputs and are normally driven to a one in sleep. these pins are actively driven immediately after sleep mode is exited.  type 3 ? these pins are i/o pins. when programmed as outputs, they can be actively held high or low during sleep. when programmed as inputs, they are actively sampled by the sa-1110.  type 4 ? these pins are i/o pins but become inputs during sleep. they can be programmed to hold the pin state at a zero or can be tristated. the receivers on these pins are disabled during sleep. these pins hold their state after sleep mode is exited until the peripheral_control_hold bit in the pssr is cleared.  type 5 ? these pins are outputs and are actively driven during sleep.  type 6 ? these pins are outputs and are tristated during sleep. table 9-2. sa-1110 power and clock supply sources and states during power-down modes power management mode module supply source run idle sleep pwr clk pwr clk pwr clk pwr clk cpu vdd 3.6864 mhz on running on stopped disabled stopped mmus (i&d) write buffer read buffer jtag running os timer lcd controller serial channel 0-4 memory and pcmcia control real-time clock vddx 32.768 khz on running interrupt controller power manager general-purpose i/o pin pads
9-34 sa-1110 developer ? s manual system control module  type 7 ? these pins are inputs and are actively sampled during sleep.  type 8 ? these pins are inputs and are not observed during sleep; the receiver is disabled.  type 9 ? these pins are analog inputs and outputs, and are always active. 9.5.7 power manager registers the power manager is controlled through eight 32-bit registers. the power manager control register (pmcr) is used to allow software invocation of sleep mode. the sleep status register (pssr) contains status bits that indicate why sleep mode was invoked. the power manager scratch pad register (pspr) is a general-purpose register used to store processor data during sleep. the power manager wake-up enable register (pwer) is used to program the desired wake-up sources in the system. the power manager general configuration register (pcfr) contains bits used to control various configurable functions within the sa-1110. the power manager pll configuration register (ppcr) allows the user to change the pll operating frequency. the power manager gpio sleep state register (pgsr) is used to program the value loaded onto gpio outputs when the sa-1110 transitions into sleep mode. the power manager oscillator status register (posr) contains a single bit that indicates whether the 32.768-khz oscillator has stabilized after a hardware reset. 9.5.7.1 power manager control register (pmcr) sleep mode is invoked by setting the force bit within the power manager control register (pmcr). the force bit is automatically cleared upon exiting sleep mode or when a hardware reset occurs. writing zero to the force bit has no effect. for reserved bits, writes are ignored and reads return zero. this register should be protected by programming mmu permissions. the following table shows the pmcr. table 9-3. pin state during sleep pin name type pin name type pin name type pin name type a 25:0 1b npior 2 udc- 4 vdd_fault 7 d 31:0 1b npce 2:1 2 txd_1 4 nreset 7 ncs 5:0 2 niois16 8 rxd_1 4 nreset_out 1b rdy 8 npwait 8 txd_2 4 ntrst 8 noe 2 psktsel 1b rxd_2 4 tdi 8 nwe 2 npreg 1b txd_3 4 tdo 6 nras/nsdcs 3:0 1 l_dd 7:0 4 rxd_3 4 tms 8 ncas/dqm 3:0 1 l_fclk 4 gp 27:0 3 tck 8 nsdras 2b l_lclk 4 smrom_en 8 tck_byp 7 nsdcas 2b l_pclk 4 rom_sel 8 testclk 7 nsdcke[1:0] 1b l_bias 4 pxtal 9 vdd ? nsdclk[2:0] 1b txd_c 4 pextal 9 vddx ? rd/nwr 1b rxd_c 4 txtal 9 vss ? npoe 2 sclk_c 4 textal 9 vssx ? npwe 2 sfrm_c 4 pwr_en 5 ?? npiow 2 udc+ 4 batt_fault 7 ??
sa-1110 developer ? s manual 9-35 system control module 9.5.7.2 power manager general configuration register (pcfr) the pcfr contains bits used to configure various functions within the sa-1110. the opde bit, if set, allows the 3.6864-mhz oscillator to be disabled during sleep mode. this bit is cleared on the assertion of nreset. the fp and fs bits control the state of the pcmcia control pins and the static memory control pins during sleep. the following table shows the bit-field definitions for this register. the fo bit forces the sa-1110 to assume that the 32-khz oscillator is stable instead of waiting for the requisite 2 ? 10 seconds using an internal counter. this function is primarily useful for "warm" hardware resets where the oscillator is already stable when the processor comes out of reset. 0h 9002 0000 pmcr read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved sf reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 bits name description 0sf sleep force. 0 - do not force invocation of sleep mode. 1 - force invocation of sleep mode. note: this bit is cleared on wake-up or a hardware reset. 31..1 ? reserved 0h 9002 0010 pcfr read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved fo fs fp opde reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 bits name description 0opde 3.6864-mhz oscillator power-down enable. 0 ? do not stop the oscillator during sleep mode (reset condition). 1 ? stop the 3.6-mhz oscillator during sleep mode. 1fp float pcmcia controls during sleep mode. this bit determines whether the pcmcia control signals are driven to a high (negated) state during sleep or not driven (floated). a zero indicates that the pins are driven high. a one indicates that they will be floated. this bit is zero at hardware reset. the pcmcia signals affected by this bit are: npoe, npwe, npiow, npior, and npce 2:1. psksel and npreg are derived from address signals and assume the state of the address bus during sleep. 2fs float static chip selects during sleep mode. this bit determines whether the static chip select control signals are driven to a high during sleep or floated. a zero indicates that the pins are driven high. a one indicates that they will be floated. the static chip select signals affected by this bit are: ncs 5:0, noe, and nwe. this bit is zero at hardware reset.
9-36 sa-1110 developer ? s manual system control module 3fo force 32-khz oscillator enable on. this bit is used to allow software to force the sa-1110 to use the 32-khz oscillator for internal clocking functions instead of waiting for it to stabilize in the normal way. this function is useful primarily to attain rapid functionality after a "warm" hardware reset when it is known that the oscillator is stable. use of this bit is intended for test purposes and some customer use in special situations. it should be used with care, however, since setting this bit when the 32-khz oscillator is not stable will yield unpredictable results. 31..4 ? reserved 0h 9002 0010 pcfr read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved fo fs fp opde reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 bits name description
sa-1110 developer ? s manual 9-37 system control module 9.5.7.3 power manager pll configuration register (ppcr) the ppcr contains bits used to configure the core operating frequency generated by the pll. the following table shows the bit-field definitions for this register. see chapter 8, ? clocks ? for the frequencies generated through settings in this register. note that the contents of this register are preserved during sleep mode and do not need to be re-initialized after a wake-up event. the ppcr is only cleared upon the assertion of nreset (hard reset). 9.5.7.4 power manager wake-up enable register (pwer) the following table shows the location of all wake-up interrupt enable bits in the pwer. for a gpio to serve as a wake-up source, it must be programmed as an input in the gpdr. when a fault condition is detected in the vdd_fault or batt_fault pins, this register is set to hexadecimal 0000 0003, enabling only gp 1,0 as wake-up sources. this register is also set to this value on hard reset (nreset asserted). for reserved bits, writes are ignored and reads return zero. . 0h 9002 0014 ppcr read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved ccf4 ccf3 ccf2 ccf1 ccf0 reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 bits name description 4..0 ccf 4..0 clock speed configuration. see chapter 8, ? clocks ? for the values in this field. 31..4 ? reserved 0h 9002 000c pwer read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 we31 reserved we27 we26 we25 we24 we23 we22 we21 we20 we19 we18 we17 we16 we15 we14 we13 we12 we11 we10 we9 we8 we7 we6 we5 we4 we3 we2 we1 we0 reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 bits name description nwe n sleep wake-up enable n (where n = 0 through 27). 0 ? wake-up due to gpio n edge detect disabled. 1 ? wake-up due to gpio n edge detect enabled. 30..28 ? reserved 31 we31 sleep wake-up enable 31. 0 ? wake-up due to rtc alarm disabled. 1 ? wake-up due to rtc alarm enabled.
9-38 sa-1110 developer ? s manual system control module 9.5.7.5 power manager sleep status register (pssr) pssr contains five status flags. the software sleep status flag is set when sleep mode is entered as a result of the sleep force (sf) control bit being set by the cpu. the battery fault status bit is set any time the batt_fault pin is asserted (even when the sa-1110 is already in sleep mode). the vdd fault status bit is set only when the assertion of the vdd_fault pin causes sleep mode invocation ( that is, if the force sleep bit is asserted and sleep mode is entered followed by the assertion of the vdd_fault pin, the vdd fault status bit is not set). hardware (power-on) reset clears pssr, but the sleep mode reset, software reset, and watchdog reset do not affect this register. the peripheral hold and dram hold bits indicate that those two interfaces retain the same value as during sleep until these bits are cleared. the five status flags are cleared when a one is written to them. writing zero to any status bit has no effect. reserved bits read as zeros and are unaffected by writes. the following table shows the pssr. 0h 9002 0004 pssr read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved ph dh vfs bfs sss reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 bits name description 0sss software sleep status. 0 ? chip has not been placed in sleep mode by setting the sleep force (sf) control bit since it was last cleared by reset or by the cpu. 1 ? chip was placed in sleep mode by setting the sleep force (sf) control bit. 1bfs battery fault status. 0 ? batt_fault pin has not been asserted since it was last cleared by a hardware reset or by the cpu. 1 ? batt_fault pin has been asserted. note: this bit will be set by the assertion of batt_fault while the sa-1110 is in sleep mode." 2vfs vdd fault status. 0 ? vdd_fault pin has not been asserted since it was last cleared by a hardware reset or by the cpu. 1 ? vdd_fault pin was asserted in run or idle mode and caused the chip to enter sleep mode. note: this bit will not be set by the assertion of vdd_fault while the sa-1110 is in sleep mode. 3dh dram control hold. this bit is set upon exit from sleep mode and indicates that the nras/nsdcs 3:0 and ncas/dqm 3:0 continue to be held low and that the drams are still in self-refresh mode. this bit should be cleared by the processor (by writing a one to it) after the dram interface has been configured but before any dram access is attempted. the nras/nsdcs and ncas/dqm lines are released when this bit is cleared. this bit is cleared on hardware reset. 4ph peripheral control hold. this bit is set upon exit from sleep mode and indicates that the peripheral pins are being held in their sleep state. this bit should be cleared by the processor (by writing a one to it) after the peripheral interfaces have been configured but before they are actually used by the processor.
sa-1110 developer ? s manual 9-39 system control module 31..5 ? reserved. 0h 9002 0004 pssr read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved ph dh vfs bfs sss reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 bits name description
9-40 sa-1110 developer ? s manual system control module 9.5.7.6 power manager scratch pad register (pspr) the power manager also contains a 32-bit register to save processor configuration information in any format the user desires. the power manager scratch pad register (pspr) is a holding register that is powered by the vddx power supply pins and is never reset (only configured via writes). any value can be written to it while in run mode. the value remains intact while in sleep mode, and can be read once sleep mode is exited. the user may use the register value to represent processor configuration prior to sleep mode invocation. (the 32 bits can represent encoded configuration information or can act as a pointer to rom where a configuration table is kept.) the pspr is a simple read/write register. see the section 9.5.8, ? power manager register locations ? on page 9-41 for its physical address. 9.5.7.7 power manager gpio sleep state register (pgsr) the gpio sleep state register (pgsr) allows the user to select the output state of each gpio pin when the sa-1110 goes into sleep mode. when a transition to sleep is required (either through software or through the assertion of the batt_fault or vdd_fault pins), the contents of the pgsr is loaded into the gpio output data register. [this register is normally controlled by software through the gpsr (set) and gpcr (clear) registers]. only pins already configured as outputs will reflect the new state; however, all 28 bits of the output register are loaded. after the sa-1110 reenters the run mode from sleep, these gpio pins retain their programmed sleep state until changed by writing ones to the gpsr or gpcr registers; question marks indicate that the values are unknown at reset. if a pin direction is switched from an input to an output, the last contents of the register will be driven onto the pin. 0h 9002 0018 pgsr read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved ss27 ss26 ss25 ss24 ss23 ss22 ss21 ss20 ss19 ss18 ss17 ss16 ss15 ss14 ss13 ss12 ss11 ss10 ss9 ss8 ss7 ss6 ss5 ss4 ss3 ss2 ss1 ss0 reset 0 0 0 0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? bits name description n ssn sleep state of gpio n (where n = 0 through 27) 0 ? this pin is driven to a zero during the transition to sleep (if programmed as an output). 1 ? this pin is driven to a one during the transition to sleep (if programmed as an output). 31..28 ? reserved
sa-1110 developer ? s manual 9-41 system control module 9.5.7.8 power manager oscillator status register (posr) the power manager oscillator status register (posr) is a single-bit, read-only register that contains a status bit indicating whether the 32.768-khz oscillator is up to speed after a hardware reset. this bit is set after the expiration of a timer that is clocked by a ring oscillator. this bit will be set within 2 ? 10 seconds after the negation of nreset. 9.5.8 power manager register locations table 9-4 shows the registers associated with the power manager and the physical addresses used to access them . 0h 9002 001c posr read-only 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved ook reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 bits name description 0 ook oscillator ok. this bit is cleared on a hardware reset and set after the 32.768-khz oscillator has stabilized. this bit is read only. 31..1 ? reserved table 9-4. power manager register locations address name description 0h 9002 0000 pmcr power manager control register 0h 9002 0004 pssr power manager sleep status register 0h 9002 0008 pspr power manager scratch pad register 0h 9002 000c pwer power manager wake-up enable register 0h 9002 0010 pcfr power manager general configuration register 0h 9002 0014 ppcr power manager pll configuration register 0h 9002 0018 pgsr power manager gpio sleep state register 0h 9002 001c posr power manager oscillator status register
9-42 sa-1110 developer ? s manual system control module 9.6 reset controller the reset controller manages the various reset sources within the sa-1110. from a programmer ? s view, it is visible as two registers: one used to invoke software reset and one to read status after booting to indicate why the processor was reset. the four types of reset in the sa-1110 include:  hardware reset hardware reset is invoked when the nreset pin is asserted and resets all units in the sa-1110 to a known state. hardware reset is intended to be used for power-up only. because the memory controller receives a full reset, all dram contents will be lost during hardware reset. the reset_out pin is asserted during hardware reset.  software reset software reset is invoked when the software reset (swr) bit in the rsrr is set by software. software reset applies reset to the majority of the sa-1110 as well as causing the assertion of the reset_out pin. during software reset, the dram refresh and configuration are not cleared. this allows dram contents to survive a software reset. after the swr bit is set, the sa-1110 stays reset for 256 processor clocks and then is allowed to boot again.  watchdog reset watchdog reset is invoked when the watchdog enable bit (we) in the ower is set and the osmr3 matches the os timer counter. when watchdog reset is invoked, the rest of the reset sequence is identical to software reset. the watchdog enable bit cannot be cleared under program control. only one of the four reset types can clear it.  sleep reset sleep reset is invoked automatically when the sa-1110 enters sleep mode. during sleep mode, the majority of the processor loses power and will receive reset prior to the negation of the pwr_en pin. sleep reset does not affect the power manager, rtc, or gpio wake-up register. during sleep reset, although the memory controller is in reset, the nras/nsdcs 3:0 and ncas/dqm 3:0 pins are held in the self-refresh state required by the drams. after booting from a reset, software can examine the reset controller reset status register (rcsr) to determine which types of reset caused the reset condition. 9.6.1 reset controller registers the reset controller contains two registers, the reset controller software reset register (rsrr) and the reset controller reset status register (rcsr). 9.6.1.1 reset controller software reset register (rsrr) the reset controller software reset register has a software reset bit, which when set, causes a reset of the sa-1110. the software reset bit (swr) is located within the least significant bit of the write-only reset controller software reset register (rsrr). writing a one to this bit causes all on-chip resources to reset but does not cause the pll to go out of lock. the software reset bit is self-resetting. it is automatically cleared to zero several system clock cycles after a one is written to it. writing zero to the software reset bit has no effect. care should be taken to restrict access to this register by programming mmu permissions. for reserved bits, writes have no effect. reading this register returns zeros.
sa-1110 developer ? s manual 9-43 system control module the following table shows the rsrr. 0h 9003 0000 rsrr write-only 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved swr reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 bits name description 0swr software reset. 0 ? do not invoke a software reset of the chip. 1 ? invoke a software reset of the chip. note : this bit is self-resetting, and is automatically cleared several system clock cycles after it has been set. 31..1 ? reserved
9-44 sa-1110 developer ? s manual system control module 9.6.1.2 reset controller status register (rcsr) the reset controller reset status register (rcsr) is used by the cpu to determine the last cause or causes of the reset. the sa-1110 has four sources of reset:  hardware reset  software reset  watchdog reset  sleep mode reset each rcsr status bit is set by a different source of reset, and can be cleared by writing a one back to that bit. note that the hardware reset state of software, watchdog, and sleep mode reset bits is zero. the table below shows the status bits within rcsr. for reserved bits, writes are ignored and reads return zero. 9.6.2 reset controller register locations table 9-5 shows the registers associated with the reset controller and the physical addresses used to access them. 0h 9003 0004 rcsr read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved smr wdr swr hwr reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 bits name description 0hwr hardware reset. 0 ? hardware reset has not occurred since the last time the cpu cleared this bit. 1 ? hardware reset has occurred since the last time the cpu cleared this bit. 1swr software reset. 0 ? software reset has not occurred since the last time the cpu cleared this bit. 1 ? software reset has occurred since the last time the cpu cleared this bit. 2wdr watchdog reset. 0 ? watchdog reset has not occurred since the last time the cpu cleared this bit. 1 ? watchdog reset has occurred since the last time the cpu cleared this bit. 3smr sleep mode reset. 0 ? sleep mode reset has not occurred since the last time the cpu cleared this bit. 1 ? sleep mode reset has occurred since the last time the cpu cleared this bit. 31..4 ? reserved table 9-5. reset controller register locations address name description 0h 9003 0000 rsrr reset controller software reset register 0h 9003 0004 rcsr reset controller status register
sa-1110 developer ? s manual 10-1 memory and pcmcia control module 10 the external memory bus interface for the intel ? strongarm * sa-1110 microprocessor (sa-1110) supports fast-page-mode (fpm) and extended-data-out (edo) asynchronous drams, synchronous dram (sdram), burst and nonburst roms, synchronous mask rom (smrom), burst and nonburst flash memory, sram, pcmcia expansion memory, and sram-like variable latency i/o devices. it is programmable through the memory interface configuration registers. figure 10-1 shows a block diagram of the maximum configuration of the memory controller. figure 10-1. general memory interface configuration * other brands and names are the property of their respective owners. a6624-01 dram bank 0 dram bank 1 dram bank 2 dram bank 3 nras/nsdcs<0> nras/nsdcs<1> nras/nsdcs<2> dynamic memory interface up to 4 banks of fpm, edo, or sdram memory (16-bit or 32-bit wide) nras/nsdcs<3> static bank 0 static bank 1 static bank 2 ncs<0> ncs<1> ncs<2> ncas/dqm<3:0> socket 0 socket 1 d<31:0> rdy nsdras, nsdcas, sdclk<2:0>, sdcke<1:0> buffers and transceivers a<25:0> pcmcia control intel ? strongarm ? * sa-1110 memory controller interface static memory interface up to 3 banks of rom, flash, sram or smrom* memory (16-bit or 32-bit wide) note: static bank 0 must be populated by "bootable" memory static / variable latency i/o bank 3 ncs<3> ncs<4> ncs<5> static memory or variable i/o interface up to 3 banks of rom, flash, smrom** or sram-like variable latency i/o devices (16-bit or 32-bit wide) pcmcia interface up to 2-socket support. requires some external buffering static / variable latency i/o bank 4 static / variable latency i/o bank 5 * strongarm is a registered trademark of arm limited. ** smrom width is required to be 32 bits and it is supported only on ncs<3.0>.
10-2 sa-1110 developer ? s manual memory and pcmcia control module 10.1 overview of operation the sa-1110 memory interface supports the following interfaces:  dynamic memory interface the dynamic memory interface supports four 16-bit or 32-bit wide banks of asynchronous memory (fpm or edo) or synchronous dram. each bank is allocated 128 mbytes of the internal memory map. however, the actual size of each bank is dependent on the particular dram configuration used. the four banks are divided into two bank pairs: the 0/1 pair and the 2/3 pair. both banks within a pair (for example, bank 0 and bank 1) must be identical in size and configuration, but the two pairs can be different (for example, the 0/1 pair can be 100 mhz sdram on a 32-bit data bus while the 2/3 pair is 60 ns edo dram on a 16-bit data bus). there are 4 bank selects, nras/nsdcs 3:0, 4 byte selects, ncas/dqm 3:0, 15 bits of multiplexed row and column addresses, a 24:10, a write enable, nwe, and an output enable, noe. when sdram is used, some of the signals perform different functions and are complemented by the nsdras, nsdcas, sdcke 1, and sdclk 2:1 signals. the sa-1110 performs cas before ras refresh (cbr) during normal operation and supports self-refreshing dram during power-down sleep mode. two sdram/smrom auto-power-down mode bits (one for clock enables, one for clocks) can be set so that each pin (including sdcke 1 and sdclk 2:1) is automatically deasserted whenever none of the corresponding banks is being accessed.  static memory interface/ static memory or variable latency i/o interface the static memory interface and the static memory or variable latency i/o interface have six chip selects (ncs 5:0) and 26 bits of byte address (a 25:0) for access of up to 64 mbyte of memory in each of six banks. each chip select is individually programmable for selecting one of the supported static memory types: nonburst rom or flash memory are supported on each of ncs 5:0, burst rom or flash memory (with nonburst writes) are supported on each of ncs 5:0, sram is supported on each of ncs 2:0, sram-like variable latency i/o is supported on each of ncs 5:3, and synchronous mask rom (smrom) is supported on each of ncs 3:0. the variable latency i/o interface differs from sram in that it allows the use of data ready input signal, rdy, to insert variable wait states. smrom is supported only on 32-bit wide data busses. for all other (asynchronous) static memory types, each chip select can be individually configured to a 16-bit or 32-bit wide data bus. noe is asserted on reads and nwe is asserted on writes. for sram and variable latency i/o, ncas/dqm 3 are byte selects for both reads and writes. unlike the sa-1100, the sa-1110 supports systems with both sram and dram (synchronous or asynchronous) by ensuring at least three cpu clock cycles of ncas/dqm(3:0) deassertion between any permutation of sram (or variable latency i/o) access and dram activity (access, cbr, or self-refresh). however, the recovery time between sram accesses must be set to satisfy the minimum ncas/dqm(3:0) deassertion time for any asynchronous dram present in the system. when the sa-1110 comes out of reset, it begins fetching and executing instructions at address 0x00, which corresponds to memory selected by ncs0. this is where boot rom is expected to be. the smrom_en pin determines if the boot rom is asynchronous or synchronous. in addition to ncs 3:0, the static memory interface for smrom uses write enable (nwe), output enable (noe), two of the sdram control signals (nsdras and nsdcas), plus a clock enable (sdcke 0) and clock (sdclk 0). the nwe pin is asserted for smrom only when writing its mode register. smrom is supported only on 32-bit wide data busses. two sdram/smrom
sa-1110 developer ? s manual 10-3 memory and pcmcia control module auto-power-down mode bits (one for clock enables, one for clocks) can be set so that each pin (including sdcke 0 and sdclk 0) is automatically deasserted whenever none of the corresponding banks is being accessed.  pcmcia interface the pcmcia interface provides control signals to support a single pcmcia card slot with additional hooks to support two slots. it shares address and data pins with the memory devices. it uses address lines, a 25:0, and data lines, d 15:0. npreg is actually a 26 and selects register space (i/o or attribute) versus memory space. npoe and npwe are provided for memory and attribute reads and writes. npior, npiow, and niois16 input control i/o reads and writes. npwait allows for extended access times. npce2 and npce1 are byte select high and low, respectively. psktsel selects between two card slots. this interface also supports 32-bit accesses that are outside the pcmcia specification. see section 10.6 for information about restriction to the use of this feature.
10-4 sa-1110 developer ? s manual memory and pcmcia control module 10.1.1 memory system examples this section gives examples of memory systems that are possible with the sa-1110. figure 10-2 shows a system using 1m x 16 drams for a total of 16 mbytes of dram. two banks of rom and two banks of flash memory are shown, each on a 32-bit wide data bus. the pcmcia interface is not shown. figure 10-2. dram system example a6625-01 nras <3:0> ncas <3:0> nwe noe d31-0 ncs3-0 a25, a24-10/ dra14-0 a9-0 3 2 1 0 31:16 15:0 dra<11:0> a<21:2> 31:16 0 15:0 3 2 1 0 3 2 1 0 ras# we# oe# ucas# lcas# a11-0 d15-0 3 2 1 0 1mx16 dram 0 123 1 2 3 ras# we# oe# ucas# lcas# a11-0 d15-0 1mx16 dram ce# we# oe# a19-0 d15-0 1mx16 flash d15-0 1mx16 flash ce# we# oe# a19-0 ce# we# oe# a19-0 d15-0 1mx16 flash d15-0 1mx16 flash ce# we# oe# a19-0 ce# oe# a19-0 d15-0 1mx16 rom ce# oe# a19-0 d15-0 1mx16 rom ce# oe# a19-0 d15-0 1mx16 rom ce# oe# a19-0 d15-0 1mx16 rom ras# we# oe# ucas# lcas# a11-0 d15-0 ras# we# oe# ucas# lcas# a11-0 d15-0 1mx16 dram 1mx16 dram ras# we# oe# ucas# lcas# a11-0 d15-0 1mx16 dram ras# we# oe# ucas# lcas# a11-0 d15-0 1mx16 dram ras# we# oe# ucas# lcas# a11-0 1mx16 dram d15-0 ras# we# oe# ucas# lcas# a11-0 d15-0 1mx16 dram rom bank 0 rom bank 1 flash bank 1 flash bank 0 dram bank 0 dram bank 1 dram bank 3 dram bank 2
sa-1110 developer ? s manual 10-5 memory and pcmcia control module figure 10-3 shows a system using 1mword x 16-bit x 4-bank sdram devices for a total of 48 mbytes. see section 10.2.1 and table 10-7 for descriptions of sdram address pin connections. figure 10-3. sdram system example a6631-01 a23/dra13-a10/dra0 nsdras,nsdcas,sdclk2-1,sdcke1,nwe nras/nsdcs2-0 d31-0 d31-16 3-2 d15-0 0-1 ncas/dqm3-0 3 2 210 cs# ras# cas# clk cke we# a13-0 dqmh dqml 4mx16 sdram dq15-0 cs# ras# cas# clk cke we# a13-0 dqmh dqml 4mx16 sdram dq15-0 cs# ras# cas# clk cke we# a13-0 dqmh dqml 4mx16 sdram dq15-0 cs# ras# cas# clk cke we# a13-0 dqmh dqml 4mx16 sdram dq15-0 cs# ras# cas# clk cke we# a13-0 dqmh dqml 4mx16 sdram dq15-0 cs# ras# cas# clk cke we# a13-0 dqmh dqml 4mx16 sdram dq15-0 1 0 1 0 1 0 3 2 3 2
10-6 sa-1110 developer ? s manual memory and pcmcia control module figure 10-4 shows a system using 2m x 16 smrom devices. see section 10.3 and table 10-7 for descriptions of smrom address pin connections. figure 10-4. smrom system example a6632-01 a22/dra12-a10/dra0 nsdras,nsdcas,sdclk0,sdcke0,nwe ncs2-0 d31-0 d31-16 d15-0 noe 210 cs# ras# cas# clk cke mr# a12-0 dqm 2mx16 smrom dq15-0 cs# ras# cas# clk cke mr# a12-0 dqm 2mx16 smrom dq15-0 cs# ras# cas# clk cke mr# a12-0 dqm 2mx16 smrom dq15-0 cs# ras# cas# clk cke mr# a12-0 dqm 2mx16 smrom dq15-0 cs# ras# cas# clk cke mr# a12-0 dqm 2mx16 smrom dq15-0 cs# ras# cas# clk cke mr# a12-0 dqm 2mx16 smrom dq15-0
sa-1110 developer ? s manual 10-7 memory and pcmcia control module 10.1.2 types of memory accesses the sa-1110 performs memory accesses for the following operations: sa-1110 will only generate a subset of all possible transactions on the bus. many of these transactions may be completed internal to the processor by accessing caches, the read buffer, on-chip registers, or the special memory space (128 mbytes starting at physical address 0xe000 0000) that returns zeroes for flushing the cache. if a memory access is followed by an idle period on the bus, the control signals return to their inactive state and the address and data signals remain at their previous values to avoid unnecessary bus transitions and eliminate the need for many pull-up resistors. 10.1.3 reads read bursts are generated by dma requests, read buffer requests, and cache line fills. all line fills (for instruction and data caches) are eight words long. dma and read buffer requests are one, four, or eight words long. all other reads are single (nonburst) word accesses. 10.1.4 writes the write buffer and dma requests generate single (nonburst) accesses that each write one byte, one halfword, or one full word. they also generate burst accesses that each write one, two, three, or four full words. additionally, cache line castouts can cause the write buffer to generate burst accesses that each write eight full words. for stores to dram or sram memory spaces, the ncas 3:0 lines enable the corresponding byte of the data bus during a write transaction. flash memory space stores must be the width of the flash data bus, either 16 or 32 bits. 10.1.5 transaction summary table 10-1 lists all the transactions that the sa-1110 can generate. no burst will cross an aligned 32-byte boundary. note that on a 16-bit data bus, each full word access becomes a two half-word burst, with address bit 1 always starting at 0. each write access to flash memory space must take place in one nonburst operation, regardless of bus size. unbuffered write uncached read buffered write linefetch read buffer fetch internal dma write level 1 translation fetch level 2 translation fetch cache line copyback read-lock-write sequence internal dma read
10-8 sa-1110 developer ? s manual memory and pcmcia control module 10.1.6 read-lock-write the read-lock-write sequence is generated by an swp instruction to a noncacheable/nonbufferable location. locked access to memory is ensured through internal arbitration of accesses to the memory controller. on the external memory bus it appears as a single read followed by a single write. 10.1.7 aborts and nonexistent memory reads from reserved address locations (as specified in the memory map) will result in a data abort exception. writes to reserved address space will have no effect. reads and writes from or to nonexistent memory are not detected in hardware. in case no memory is selected on a read, the value last driven on the data bus is returned. a single access to a disabled dram bank (mdcnfg:dex=0) will cause a cbr refresh cycle to all banks. this technique is used in the hardware and sleep reset procedures (see section 10.7.1 ) and the software and watchdog reset procedures (see section 10.7.1 ). zeros are returned to the register file on reads and writes are dropped. a burst read access to a disabled dram bank will result in a data abort exception. table 10-1. sa-1110 transactions bus operation burst size (words) starting address bits 4:2 description read single 1 any generated by core, dma, or read buffer request. read burst 4 0 4 generated by read buffer or dma request. read burst 8 0 generated by cacheline fills or read buffer request. write single 1 any 1..4 bytes are written as specified by the byte mask. generated by write buffer or dma request. write burst 2 0, 1, 2 4, 5, 6 all 4 bytes of each word are written. generated by write buffer or dma request. write burst 3 0, 1 4, 5 all 4 bytes of each word are written. generated by write buffer or dma request. write burst 4 0 4 all 4 bytes of each word are written. generated by write buffer or dma request. write burst 8 0 cacheline copyback. all 32 bytes are written. generated by write buffer.
sa-1110 developer ? s manual 10-9 memory and pcmcia control module 10.2 memory configuration registers the sa-1110 memory interface is programmed through a set of configuration registers that are described in the following sections. many timing parameters are encoded as a number of memory clock cycles, where each memory clock cycle is equivalent to two cpu clock cycles. table 10-2 shows the registers associated with the memory interface and the physical addresses used to access them. all addressing is little endian. these registers are readable and writable only as full words. they are grouped together within one page and thus all have the same memory protections. note: a question mark (?) signifies that the reset value of that bit is undefined when the processor has completed its reset cycle. table 10-2. memory interface control registers physical address symbol register name 0xa000 0000 mdcnfg dram configuration register 0xa000 0004 mdcas00 cas waveform rotate register 0 for dram bank pair 0/1 0xa000 0008 mdcas01 cas waveform rotate register 1 for dram bank pair 0/1 0xa000 000c mdcas02 cas waveform rotate register 2 for dram bank pair 0/1 0xa000 0010 msc0 static memory control register 0 0xa000 0014 msc1 static memory control register 1 0xa000 0018 mecr expansion memory (pcmcia) bus configuration register 0xa000 001c mdrefr dram refresh control register 0xa000 0020 mdcas20 cas waveform rotate register 0 for dram bank pair 2/3 0xa000 0024 mdcas21 cas waveform rotate register 1 for dram bank pair 2/3 0xa000 0028 mdcas22 cas waveform rotate register 2 for dram bank pair 2/3 0xa000 002c msc2 static memory control register 2 0xa000 0030 smcnfg smrom configuration register
10-10 sa-1110 developer ? s manual memory and pcmcia control module 10.2.1 dram configuration register (mdcnfg) mdcnfg is a read/write register and contains control bits for configuring the dram. both dram banks within a pair (0/1 or 2/3) must be implemented with the same type of dram devices, but the two bank pairs may differ. question marks indicate that the values are unknown at hardware or sleep reset. 0h a000 0000 mdcnfg read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 twr21 twr20 tdl21 tdl20 trp23 trp22 trp21 trp20 cdb22 drac22 drac21 drac20 dwid2 dtim2 de3 de2 twr01 twr00 tdl01 tdl00 trp03 trp02 trp01 trp00 cdb20 drac02 drac01 drac00 dwid0 dtim0 de1 de0 reset ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0 0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0 0 (sheet 1 of 4) bits name description 1..0 de1..0 dram enable for bank 1 (bit 1) and bank 0 (bit 0). for each dram bank, there is an enable bit. a single (nonburst) access (read or write) to a disabled dram bank triggers a cbr refresh cycle to all banks. when all banks are disabled, the refresh counter is disabled. 0 ? dram bank disabled. 1 ? dram bank enabled. these bits are cleared by hardware or sleep reset. 2dtim0 dram timing type for bank pair 0/1. 0 ? asynchronous (fpm or edo). 1 ? synchronous (sdram). 3dwid0 dram data bus width for bank pair 0/1. 0 ? 32 bits. 1 ? 16 bits. 6..4 drac02..0 dram row address bit count for bank pair 0/1. this count includes one or two bits for sdram bank selects. 000 ? 9 row address bits. (select this for support of 9x9 and 9x8 drams.) 001 ? 10 row address bits. (select this for support of 10x10, 10x9, and 10x8 drams.) 010 ? 11 row address bits. (select this for support of 11x11, 11x10, 11x9, and 11x8 drams.) 011 ? 12 row address bits. (select this for support of 12x12, 12x11, 12x10, 12x9, and 12x8 drams.) 100 ? 13 row address bits. (select this for support of 13x11, 13x10, 13x9, and 13x8 drams.) 101 ? 14 row address bits. (select this for support of 14x10, 14x9, and 14x8 drams.) 110 ? 15 row address bits. (select this for support of 15x11 (16-bit data bus only), 15x10, 15x9, and 15x8 drams.) 111 ? reserved. see table 10-7 for more information. 7 cdb20 clock divide by 2 for bank pair 0/1. 0 ? cas waveform rotate register (mdcas00, 01, 02) rotated every cpu clock. required for sdram. 1 ? cas waveform rotate register rotated every memory clock. (cpu clock divided by 2.) sdram requires cdb20 = 0. however, the frequency of the sdram bank pair 0/1 clock (sdclk 1) can be set to either the memory clock frequency (mdrefr:k1db2 = 0) or half the memory clock frequency (mdrefr:k1db2 = 1).
sa-1110 developer ? s manual 10-11 memory and pcmcia control module 11..8 trp03..0 ras precharge for bank pair 0/1. trp is encoded with the minimum number of memory clocks (minus 1) of nras/nsdcs deassertion between transfers. for sdram running at the full memory clock frequency, trp determines the minimum delay (trp+1 memory cycles) from the first memory clock rising edge following data latch for autoprecharge read command (readap) to the memory clock edge upon which subsequent row commands (bank activate, mode register set, self-refresh, or cbr) are latched. the minimum delay from latching of readap command to latching of subsequent row commands is tdl+trp+2 memory cycles. the minimum delay from command and data latching for autoprecharge write (writeap) to latching of subsequent row commands is trp+twr+1 memory cycles. trp must be written to a value of at least 1 for sdram. the unit size for trp is always the internal memory cycle, even if sdram is run at half the memory clock frequency (mdrefr:k1db2 = 1). however, for sdram running at half frequency, the unit size for tdl is two memory cycles and trp is effectively increased by one (because setup time for commands and write data is increased by one memory cycle. 13..12 tdl01..0 data input latch after cas deassertion for bank 0/1. for asynchronous dram, tdl is encoded with he number of cpu clocks between the deassertion of ncas/dqm and latching of read data. for sdram, tdl is encoded with the cas latency (external sdclk delay between reception of the read command and latching of the data). the unit size for tdl is the external sdclk cycle: when sdram is run at half the memory clock frequency (mdrefr:k1db2 = 1), the delay is 2*tdl internal memory cycles. 00 ? 0 clocks for asynchronous dram. reserved (do not use) for sdram. 01 ? 1 clock later 10 ? 2 clocks later. 11 ? 3 clocks later. for sdram, the mdcasxx registers provide an option to add one-half memory clock of cas latency to tdl. see section 10.2.3.2 for a detailed description. chapter 13, ? ac parameters ? provides frequency-dependent guidelines for using the delayed latching option. 15..14 twr01..0 sdram write recovery (write data to precharge delay) for bank pair 0/1 for sdram only. twr is encoded with the number of memory clocks to be added to the minimum precharge delay that follows write transfers. the unit size for twr is always the internal memory cycle, even if sdram is run at half the memory clock frequency (mdrefr:k1db2 = 1). 17..16 de3..2 dram enables for bank 3 (bit 17) and bank 2 (bit 16) for each dram bank, there is an enable bit. a single (nonburst) access (read or write) to a disabled dram bank triggers a cbr refresh cycle to all banks. when all banks are disabled, the refresh counter is disabled. 0 ? dram bank disabled. 1 ? dram bank enabled. these bits are cleared by hardware or sleep reset. 18 dtim2 dram timing type for bank pair 2/3. 0 ? asynchronous (fpm or edo). 1 ? synchronous (sdram). 0h a000 0000 mdcnfg read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 twr21 twr20 tdl21 tdl20 trp23 trp22 trp21 trp20 cdb22 drac22 drac21 drac20 dwid2 dtim2 de3 de2 twr01 twr00 tdl01 tdl00 trp03 trp02 trp01 trp00 cdb20 drac02 drac01 drac00 dwid0 dtim0 de1 de0 reset ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0 0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0 0 (sheet 2 of 4) bits name description
10-12 sa-1110 developer ? s manual memory and pcmcia control module 19 dwid2 dram data bus width for bank pair 2/3. 0 ? 32 bits. 1 ? 16 bits. 22..20 drac22..0 dram row address bit count for bank pair 2/3. this count includes one or two bits for sdram bank selects. 000 ? 9 row address bits. (select this for support of 9x9 and 9x8 drams.) 001 ? 10 row address bits. (select this for support of 10x10, 10x9, and 10x8 drams.) 010 ? 11 row address bits. (select this for support of 11x11, 11x10, 11x9, and 11x8 drams.) 011 ? 12 row address bits. (select this for support of 12x12, 12x11, 12x10, 12x9, and 12x8 drams.) 100 ? 13 row address bits. (select this for support of 13x11, 13x10, 13x9, and 13x8 drams.) 101 ? 14 row address bits. (select this for support of 14x10, 14x9, and 14x8 drams.) 110 ? 15 row address bits. (select this for support of 15x11 (16-bit data bus only), 15x10, 15x9, and 15x8 drams.) 111 ? reserved. see table 10-7 for more information. 23 cdb22 clock divide by 2 for bank pair 2/3. 0 ? cas waveform rotate register (mdcas20, 21, 22) rotated every cpu clock. required for sdram. 1 ? cas waveform rotate register rotated every memory clock. (cpu clock divided by 2.) sdram requires cdb22 = 0. however, the frequency of the sdram bank pair 2/3 clock (sdclk 2) can be set to either the memory clock frequency (mdrefr:k2db2 = 0) or half the memory clock frequency (mdrefr:k2db2 = 1). 27..24 trp23..0 ras precharge for bank pair 2/3. trp is encoded with the minimum number of memory clocks (minus 1) of nras/nsdcs deassertion between transfers. for sdram running at the full memory clock frequency, trp determines the minimum delay (trp+1 memory cycles) from the first memory clock rising edge following data latch for autoprecharge read command (readap) to the memory clock edge upon which subsequent row commands (bank activate, mode register set, self-refresh, or cbr) are latched. the minimum delay from latching of readap command to latching of subsequent row commands is tdl+trp+2 memory cycles. the minimum delay from command and data latching for autoprecharge write (writeap) to latching of subsequent row commands is trp+twr+1 memory cycles. trp must be written to a value of at least 1 for sdram. the unit size for trp is always the internal memory cycle, even if sdram is run at half the memory clock frequency (mdrefr:k2db2 = 1). however, for sdram running at half frequency, the unit size for tdl is two memory cycles and trp is effectively increased by one (because setup time for commands and write data is increased by one memory cycle). 0h a000 0000 mdcnfg read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 twr21 twr20 tdl21 tdl20 trp23 trp22 trp21 trp20 cdb22 drac22 drac21 drac20 dwid2 dtim2 de3 de2 twr01 twr00 tdl01 tdl00 trp03 trp02 trp01 trp00 cdb20 drac02 drac01 drac00 dwid0 dtim0 de1 de0 reset ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0 0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0 0 (sheet 3 of 4) bits name description
sa-1110 developer ? s manual 10-13 memory and pcmcia control module 29..28 tdl21..0 data input latch after cas deassertion for bank 2/3. for asynchronous dram, tdl is encoded with he number of cpu clocks between the deassertion of ncas/dqm and latching of read data. for sdram, tdl is encoded with the cas latency (external sdclk delay between reception of the read command and latching of the data). the unit size for tdl is the external sdclk cycle: when sdram is run at half the memory clock frequency (mdrefr:k2db2 = 1), the delay is 2*tdl internal memory cycles. 00 ? 0 clocks for asynchronous dram. reserved (do not use) for sdram. 01 ? 1 clock later 10 ? 2 clocks later. 11 ? 3 clocks later. for sdram, the mdcasxx registers provide an option to add one-half memory clock of cas latency to tdl. see section 10.2.3.2 for a detailed description. chapter 13, ? ac parameters ? provides frequency-dependent guidelines for using the delayed latching option. 31..30 twr21..0 sdram write recovery (write data to precharge delay) for bank pair 2/3 for sdram only. twr is encoded with the number of memory clocks to be added to the minimum precharge delay that follows write transfers. the unit size for twr is always the internal memory cycle, even if sdram is run at half the memory clock frequency (mdrefr:k2db2 = 1). 0h a000 0000 mdcnfg read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 twr21 twr20 tdl21 tdl20 trp23 trp22 trp21 trp20 cdb22 drac22 drac21 drac20 dwid2 dtim2 de3 de2 twr01 twr00 tdl01 tdl00 trp03 trp02 trp01 trp00 cdb20 drac02 drac01 drac00 dwid0 dtim0 de1 de0 reset ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0 0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0 0 (sheet 4 of 4) bits name description
10-14 sa-1110 developer ? s manual memory and pcmcia control module 10.2.2 dram refresh control register (mdrefr) mdrefr is a read/write register and contains control bits for refresh of both dram bank pairs. the dram refresh interval field applies to all types of dram (asynchronous and synchronous). mdrefr also contains control/status bits for sdram self-refresh, sdram/smrom clock divisors, sdram/smrom clocks running, and sdram/smrom clock enable pin states. independent control/status is provided for each of the clock pins (sdclk 2:0) and clock enable pins (sdcke 1:0). question marks indicate that the values are unknown at hardware or sleep reset. the clock run bits (k0run, k1run, and k2run) and clock enable bits (e0pin and e1pin) provide ultimate software control of sdram and smrom low power modes. they should be used with extreme caution because, when any of these bits are cleared, the corresponding memory is inaccessible. upon hardware or sleep reset, k0run and e0pin are set to the value of the smrom_en pin. auto-power-down, enabled by the kapd and eapd bits, is an automatic mechanism for minimizing power consumption in the sa-1110 sdclk pin drivers and the sdram/smrom devices. eapd and kapd must be written to the same value. a latency penalty of one memory cycle (two cpu cycles) is incurred when re-starting sdclk and/or sdcke between non-consecutive sdram/smrom transfers. 0h a000 001c mdrefr read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 slfrsh reserved kapd eapd reserved k2db2 k2run reserved reserved k1db2 k1run e1pin reserved k0db2 k0run e0pin dri11 dri10 dri9 dri8 dri7 dri6 dri5 dri4 dri3 dri2 dri1 dri0 trasr3 trasr2 trasr1 trasr0 reset 1 ? 0 0 ? 1 0 ? ? 1 0 0 ? 1 * * ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? * upon hardware or sleep reset, k0run and e0pin are set to the value of the smrom_en pin. (sheet 1 of 4) bits name description 3..0 trasr 3..0 ras assertion during cbr, all banks. for asynchronous dram, trasr is encoded with the number of memory clocks (minus one) that nras/nsdcs is asserted during cas before ras refresh. for systems with sdram, trasr must be at least one (1) to cause the required one clock assertion of nras/nsdcs and ncas/dqm. if a system contains no asynchronous dram, trasr=1 should be used to minimize the cbr duration.
sa-1110 developer ? s manual 10-15 memory and pcmcia control module 15..4 dri 11..0 dram refresh interval, all banks. the number of memory clock cycles (divided by 32) between cas before ras (cbr) refresh cycles. one row is refreshed in each dram bank during each cbr refresh cycle. this interval is applicable to asynchronous and/or synchronous dram in all four banks. the value that must be loaded into this register is calculated as follows: dri = number of cycles /32 = (refresh time - longest burst access time) / rows) x memory clock frequency /32. the longest burst access time to subtract must consider full burst accesses to dram and smrom. it must also consider 32-bit word accesses (either nonburst or within a burst) to rom, flash, sram, or variable latency i/o. the longest access time for variable latency i/o includes the maximum number of wait cycles caused by deassertion of the rdy pin. thus, indefinitely long deassertions of the rdy pin will prevent refresh and may corrupt the dram contents. rom, flash, sram, or variable latency i/o transfers may be interrupted to service a dram refresh cycle after each 32-bit word. if there is a read on a 16-bit bus, a refresh cycle may be inserted after 2 read cycles. if there is a read to a 32-bit bus, the refresh waits one read cycle to be serviced. the dram interface inserts cbr refresh cycles between bursts of up to 8 words. since the address pins are ignored by dram during cbr refresh cycles, pcmcia transactions may be ongoing during a refresh cycle and will not be interrupted. 16 e0pin smrom clock enable pin 0 (sdcke 0) level control/status. it is the control/status bit for the sdcke 0 pin and it is automatically cleared upon entering sleep mode. it is set upon hardware or sleep reset if static memory bank 0 (boot space) is configured for smrom (smrom_en = 1); otherwise it is cleared upon hardware or sleep reset. e0pin can be cleared by program to cause a power-down command (if k0run=1). however, this capability should be used with extreme caution because the resulting state prohibits automatic transitions for mode register set and read commands. e0pin can be set by program to cause a power-down-exit command (if k0run=1). see section 10.5.11 . 17 k0run smrom clock pin 0 (sdclk 0) run control/status. it is the control/status bit for operation (run or not) of sdclk 0 and it is automatically cleared upon entering sleep mode. it is set upon hardware or sleep reset if static memory bank 0 (boot space) is configured for smrom (smrom_en = 1); otherwise it is cleared upon hardware or sleep reset. k0run can be cleared by program, but this capability should be used with extreme caution because the resulting state prohibits automatic transitions for any commands. see section 10.5.11 . 18 k0db2 smrom clock pin 0 (sdclk 0) divide by 2 control/status. it is the control/status bit for clock divisor of sdclk 0. when set, sdclk 0 runs at one-half the memory clock frequency. when clear, sdclk 0 runs at the memory clock frequency. this bit is automatically set upon hardware or sleep reset. 19 ? reserved. 0h a000 001c mdrefr read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 slfrsh reserved kapd eapd reserved k2db2 k2run reserved reserved k1db2 k1run e1pin reserved k0db2 k0run e0pin dri11 dri10 dri9 dri8 dri7 dri6 dri5 dri4 dri3 dri2 dri1 dri0 trasr3 trasr2 trasr1 trasr0 reset 1 ? 0 0 ? 1 0 ? ? 1 0 0 ? 1 * * ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? * upon hardware or sleep reset, k0run and e0pin are set to the value of the smrom_en pin. (sheet 2 of 4) bits name description
10-16 sa-1110 developer ? s manual memory and pcmcia control module 20 e1pin sdram clock enable pin 1 (sdcke 1) level control/status. it is the control/status bit for the sdcke 1 pin and it is automatically cleared upon entering sleep mode or upon hardware or sleep reset. e1pin can be cleared by program to cause a power-down command (if k1run=1 and/or k2run=1, and slfrsh=0). however, this capability should be used with extreme caution because the resulting state prohibits automatic transitions for mode register set, read, write, and refresh commands. e1pin can be set by program to cause a power-down-exit command (if k1run=1 and/or k2run=1, and slfrsh=0). see section 10.4.5 . setting e1pin is a part of the hardware or sleep reset procedure for sdram. see section 10.7.1 . 21 k1run sdram clock pin 1 (sdclk 1) run control/status. it is the control/status bit for operation (run or not) of sdclk 1 and it is automatically cleared upon entering sleep mode and upon hardware or sleep reset. k1run also can be cleared by program. however, this capability should be used with extreme caution because the resulting state prohibits automatic transitions for any commands. see section 10.4.5 . setting k1run and/or k2run is a part of the hardware and sleep reset procedure for sdram. see section 10.7.1 . 22 k1db2 sdram clock pin 1 (sdclk 1) divide by 2 control/status. it is the control/status bit for clock divisor of sdclk 1. when set, sdclk 1 runs at one-half the memory clock frequency. when clear, sdclk 1 runs at the memory clock frequency this bit is automatically set upon hardware or sleep reset. 24..23 ? reserved. 25 k2run sdram clock pin 2 (sdclk 2) run control/status. it is the control/status bit for operation (run or not) of sdclk 2 and it is automatically cleared upon entering sleep mode and upon hardware or sleep reset. k2run also can be cleared by program. however, this capability should be used with extreme caution because the resulting state prohibits automatic transitions for any commands. see section 10.4.5 . setting k1run and/or k2run is a part of the hardware and sleep reset procedure for sdram. see section 10.7.1 . 26 k2db2 sdram clock pin 2 (sdclk 2) divide by 2 control/status. it is the control/status bit for clock divisor of sdclk 2. when set, sdclk 2 runs at one-half the memory clock frequency. when clear, sdclk 2 runs at the memory clock frequency. this bit is automatically set upon hardware or sleep reset. 27 ? reserved. 28 eapd sdram/smrom clock enable pin (sdcke 1:0) auto-power-down enable. if eapd=1, each of the clock enable pins (sdcke 0 for smrom and sdcke 1 for sdram) will automatically deassert whenever none of the corresponding banks is being accessed. eapd and kapd must be written to the same value. see figure 10-7 and figure 10-19 . auto-power-down must not be enabled until all other sdram/smrom hardware or sleep reset procedures have been completed. see section 10.7.1 . 0h a000 001c mdrefr read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 slfrsh reserved kapd eapd reserved k2db2 k2run reserved reserved k1db2 k1run e1pin reserved k0db2 k0run e0pin dri11 dri10 dri9 dri8 dri7 dri6 dri5 dri4 dri3 dri2 dri1 dri0 trasr3 trasr2 trasr1 trasr0 reset 1 ? 0 0 ? 1 0 ? ? 1 0 0 ? 1 * * ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? * upon hardware or sleep reset, k0run and e0pin are set to the value of the smrom_en pin. (sheet 3 of 4) bits name description
sa-1110 developer ? s manual 10-17 memory and pcmcia control module 29 kapd sdram/smrom clock pin (sdclk 2:0) auto-power-down enable. if kapd=1, each of the clock pins (sdclk 0 for smrom, sdclk 1 for sdram bank pair 0/1, and sdclk 2 for sdram bank pair 2/3) will automatically deassert (stop running) whenever none of the corresponding banks is being accessed. eapd and kapd must be written to the same value. see figure 10-7 and figure 10-19 . auto-power-down must not be enabled until all other sdram/smrom hardware or sleep reset procedures have been completed. see section 10.7.1 . 30 ? reserved. 31 slfrsh sdram self-refresh control/status. it is the control/status bit for entering and exiting sdram self-refresh and it is automatically set upon a hardware or sleep reset. slfrsh can be set by program to force a self-refresh command. e1pin does not have to be cleared. the appropriate clock run bits (k1run and/or k2run) must remain set until sdram has entered self-refresh and must be set prior to exiting self-refresh (clearing slfrsh). also, auto-power-down must be disabled (eapd=kapd=0) to ensure power-down-exit upon subsequent clearing of slfrsh. this capability should be used with extreme caution because the resulting state prohibits automatic transitions for any commands.see section 10.4.5 . clearing slfrsh is a part of the hardware or sleep reset procedure for sdram. see section 10.7.1 . 0h a000 001c mdrefr read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 slfrsh reserved kapd eapd reserved k2db2 k2run reserved reserved k1db2 k1run e1pin reserved k0db2 k0run e0pin dri11 dri10 dri9 dri8 dri7 dri6 dri5 dri4 dri3 dri2 dri1 dri0 trasr3 trasr2 trasr1 trasr0 reset 1 ? 0 0 ? 1 0 ? ? 1 0 0 ? 1 * * ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? * upon hardware or sleep reset, k0run and e0pin are set to the value of the smrom_en pin. (sheet 4 of 4) bits name description
10-18 sa-1110 developer ? s manual memory and pcmcia control module 10.2.3 cas waveform rotate registers (mdcas00, mdcas01, mdcas02, mdcas20, mdcas21, mdcas22) mdcas00, mdcas01, and mdcas02 are 32-bit read/write registers that contain the ncas waveform for a burst read or write to asynchronous dram within dram bank pair 0/1. they also control the ras-to-cas delay and read data latching edges for sdram within dram bank pair 0/1 and smrom within static bank pair 0/1 (ncs 0 and ncs 1). for asynchronous dram, each bit represents one cpu cycle if mdcnfg:cdb20 is "0", 2 cpu cycles (one memory clock cycle) if mdcnfg:cdb20 is "1" or mdcnfg:dwid0 is "1". dwid0 overrides cdb20 because the dram state machine supports 16-bit data-busses only if each half of a full-word access occurs on the memory clock ? s rising edge. for sdram and smrom, each bit always represents one cpu cycle. question marks indicate that the values are unknown at hardware or sleep reset. mdcas20, mdcas21, and mdcas22 are 32-bit read/write registers that provide the same functionality for asynchronous dram or sdram within dram bank pair 2/3 and smrom within static bank pair 2/3 (ncs 2 and ncs 3), as a function of mdcnfg:cdb22 and mdcnfg:dwid2. the hardware or sleep reset value for mdcas00 (shown below) supports smrom single word reads at one-half the memory clock frequency (mdrefr:k0db2=1), with a ras-to-cas delay of two cycles. if smrom_en=1, this value must be maintained to avoid a mismatch in ras latency between the sa-1110 and boot smrom following a subsequent hardware or sleep reset. 10.2.3.1 mdcas registers with asynchronous dram when asynchronous dram is accessed, the least significant bit of mdcas00 goes out first and is the cycle coincident with the assertion of nras/nsdcs. bit 1 is one cycle after the assertion of nras/nsdcs, and so forth. mdcas01 is appended after mdcas00 and mdcas02 is appended after mdcas01. a "1" in any field causes ncas/dqm to be deasserted in that cycle and a "0" causes ncas/dqm to be asserted in that cycle. the memory controller counts ncas/dqm pulses and deasserts nras/nsdcs in the cycle following the deassertion of the final ncas/dqm pulse of the burst. for optimum performance, all ncas/dqm pulses should be programmed. however, omissions and very long bursts (for example, when using a 16-bit data bus) are accommodated by rotation from the least significant bit of mdcas00 (output) to the most significant bit of mdcas02. when mdcnfg:cdb20 is "0"and mdcnfg:dwid0 is "0", the mdcas00 must contain "1"s in the lower 4 bits and each transition of ncas/dqm must be a minimum of 2 clocks (so ncas/dqm must be asserted for a minimum of 2 cpu clock cycles and deasserted for a minimum 0h a000 0004 mdcas00 read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 c00_31 c00_30 c00_29 c00_28 c00_27 c00_26 c00_25 c00_24 c00_23 c00_22 c00_21 c00_20 c00_19 c00_18 c00_17 c00_16 c00_15 c00_14 c00_13 c00_12 c00_11 c00_10 c00_9 c00_8 c00_7 c00_6 c00_5 c00_4 c00_3 c00_2 c00_1 c00_0 reset ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0 1 0 1 0 1 1 1 1 1 1 1
sa-1110 developer ? s manual 10-19 memory and pcmcia control module of 2 cpu clock cycles). when mdcnfg:cdb20 is "1" or mdcnfg:dwid0 is "1", the mdcas00 must contain "1"s in the lower 2 bits and each transition of ncas/dqm must be a minimum of 1 bit. 10.2.3.2 mdcas registers with sdram and smrom see table 10-3 for a description of possible mdcas encodings for sdram or smrom. nsdcas asserts as indicated by the first "1" to "0" transition: similar to the behavior of ncas/dqm for asynchronous dram. but, because the least significant bit of mdcas goes out on nsdcas one cpu cycle after the assertion of nras/nsdcs, the ras-to-cas delay is one cpu cycle greater than the number of leading 1 ? s. a ras-to-cas delay of n (for example 2, 3, or 4) memory cycles corresponds to 2n-1 (for example 3, 5, or 7) leading 1 ? s. for sdram, nsdcas remains asserted throughout the burst, regardless of subsequent transitions programmed into mdcas. for smrom, nsdcas is asserted only through the first column address. in either case, subsequent "0" to "1" transitions must be programmed to reference the data input latch delay (mdcnfg:tdl0,2 or smcnfg:cl0,2) for every beat of the burst. the first "0" to "1" transition must be either one-half or one memory cycles (1 or 2 bits) after the first "1" to "0" transition: the latter option (2 initial "0" bits) provides an additional cpu cycle of delay for data latching. it is ignored unless mdrefr:kndb2=0 (using memory clock frequency), and is useful under the following common circumstances (evaluated for specific load): note: subsequent to the first "0" to "1" transition, mdcas must be filled through the 96th bit with the 2-bit repeating pattern of "0" followed by "1". chapter 13, ? ac parameters ? provides frequency-dependent guidelines for using the delayed latching option. sharing mdcas registers asynchronous dram or sdram can share mdcas registers with smrom. asynchronous dram must use cdb2n=1 and/or the cpu clock period (labeled "tcpu" in table 10-3 ) must be fairly large. sdram and smrom can share mdcas registers if they use the same ras-to-cas delay (the entries labeled ? trcd ? in table 10-3 ). if both the sdram and smrom use the memory clock frequency, they must also use the same clock edge for read data latching. mdcas registers can be shared even if the sdram and smrom are running at different frequencies (for example, smrom using sdclk 0 with mdrefr:k0db2=1 and sdram using sdclk 1 with mdrefr:k1db2=0). this is possible because the minimum number of clock cycles for ras-to-cas delay typically scales with frequency. reference edges for cas latency are made insensitive to the clock divisor by ignoring odd-numbered (first, third, and so forth) "0" to "1" transitions if mdrefr:k0db2=1 for smrom, mdrefr:k1db2=1 for sdram bank pair 0/1, or mdrefr:k2db2=1 for sdram bank pair 2/3). the number of ? 0 ? to ? 1 ? transitions required to serve a burst transaction becomes twice the max(mem clock to sdclk delay) + max(sdclk to data delay) + max(data to mem clock set up) >= tmem max(mem clock to sdclk delay) + max(sdclk to data delay) + max(data to mem clock set up) <= tmem + tcpu min(mem clock to sdclk delay) + min(sdclk to data delay) + min(data to mem clock set up) >= tcpu
10-20 sa-1110 developer ? s manual memory and pcmcia control module burst length. by repeating the pattern of ? 0 ? to ? 1 ? transitions up through the most significant bit of mdcas, one can ensure that an internal burst length of eight will always be accommodated: even if the transaction uses a 16-bit data bus (sdram, but not smrom) and the memory clock divisor. table 10-3 describes how dram and synchronous memories can share mdcas registers. key to table: tcpu ? cpu clock period trcd ? ras-to-cas delay tccd ? cas-to-cas delay tac ? delay from sdclk rising edge to read data (d) latching edge tcas ? cas low time tcp ? cas high time 10.2.4 static memory control registers (msc2 ? 0) msc2, msc1, and msc0 are read/write registers and contain control bits for configuring static memory (or variable latency i/o) that correspond to chip select pairs ncs(5:4), ncs(3:2), and ncs(1:0), respectively. timing fields are specified as numbers of memory clock cycles. the memory clock cycle consists of two cpu cycles. each of the three registers contains two identical cnfg fields: one for each chip select within the pair. please note the distinct descriptions for ncs(5:3) variable latency i/o in the following table. on hardware or sleep reset, the msc0: 15:0 field is set to 0b 1111 1111 1111 1x00 (binary) where x represents the inverse of the rom_sel pin. this forces ncs(0) to the slowest possible nonburst rom timings. all other fields in msc0, msc1, and msc2 are unaffected by reset; question marks indicate that the values are unknown at hardware or sleep reset. table 10-3. timing interpretations of possible sdram/smrom mdcas settings possible sdram/smrom settings for: mdcasn0 31:0 mdcasn1 31:0 mdcasn2 31:0 sdram/smrom timing interpretation asynchronous dram timing interpretation kndb2 = 0 kndb2 = 1 cdb2n = 0 cdb2n = 1 0101 0101 0101 0101 0101 0101 0101 0111 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 trcd=4*tcpu tccd=2*tcpu tac=2*tcpu trcd=4*tcpu tccd=4*tcpu tac=4*tcpu trcd=3*tcpu tcas=1*tcpu tcp=1*tcpu trcd=6*tcpu tcas=2*tcpu tcp=2*tcpu 1010 1010 1010 1010 1010 1010 1010 0111 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 trcd=4*tcpu tccd=2*tcpu tac=3*tcpu trcd=4*tcpu tccd=4*tcpu tac=4*tcpu trcd=3*tcpu tcas=1*tcpu tcp=1*tcpu trcd=6*tcpu tcas=2*tcpu tcp=2*tcpu 0101 0101 0101 0101 0101 0101 0101 1111 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 trcd=6*tcpu tccd=2*tcpu tac=2*tcpu not applicable trcd=5*tcpu tcas=1*tcpu tcp=1*tcpu trcd=10*tcpu tcas=2*tcpu tcp=2*tcpu 1010 1010 1010 1010 1010 1010 1001 1111 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 trcd=6*tcpu tccd=2*tcpu tac=3*tcpu not applicable trcd=5*tcpu tcas=1*tcpu tcp=1*tcpu trcd=10*tcpu tcas=2*tcpu tcp=2*tcpu 0101 0101 0101 0101 0101 0101 0111 1111 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 0101 trcd=8*tcpu tccd=2*tcpu tac=2*tcpu trcd=8*tcpu tccd=4*tcpu tac=4*tcpu trcd=7*tcpu tcas=1*tcpu tcp=1*tcpu trcd=14*tcpu tcas=2*tcpu tcp=2*tcpu 1010 1010 1010 1010 1010 1010 0111 1111 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 trcd=8*tcpu tccd=2*tcpu tac=3*tcpu trcd=8*tcpu tccd=4*tcpu tac=4*tcpu trcd=7*tcpu tcas=1*tcpu tcp=1*tcpu trcd=14*tcpu tcas=2*tcpu tcp=2*tcpu
sa-1110 developer ? s manual 10-21 memory and pcmcia control module note: if any of the ncs(3:0) banks is configured for synchronous mask rom (smrom) via smcnfg:sm 3:0, the corresponding half-words of msc0 and/or msc1 are ignored. 0h a000 0010 msc0 read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rrr1_2 rrr1_1 rrr1_0 rdn1_4 rdn1_3 rdn1_2 rdn1_1 rdn1_0 rdf1_4 rdf1_3 rdf1_2 rdf1_1 rdf1_0 rbw1 rt1_1 rt1_0 rrr0_2 rrr0_1 rrr0_0 rdn0_4 rdn0_3 rdn0_2 rdn0_1 rdn0_0 rdf0_4 rdf0_3 rdf0_2 rdf0_1 rdf0_0 rbw0 rt0_1 rt0_0 reset ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 1 1 1 1 1 1 1 1 1 1 1 1 1 x 0 0 0h a000 0014 msc1 read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rrr3_2 rrr3_1 rrr3_0 rdn3_4 rdn3_3 rdn3_2 rdn3_1 rdn3_0 rdf3_4 rdf3_3 rdf3_2 rdf3_1 rdf3_0 rbw3 rt3_1 rt3_0 rrr2_2 rrr2_1 rrr2_0 rdn2_4 rdn2_3 rdn2_2 rdn2_1 rdn2_0 rdf2_4 rdf2_3 rdf2_2 rdf2_1 rdf2_0 rbw2 rt2_1 rt2_0 reset ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0h a000 002c msc2 read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rrr5_2 rrr5_1 rrr5_0 rdn5_4 rdn5_3 rdn5_2 rdn5_1 rdn5_0 rdf5_4 rdf5_3 rdf5_2 rdf5_1 rdf5_0 rbw5 rt5_1 rt5_0 rrr4_2 rrr4_1 rrr4_0 rdn4_4 rdn4_3 rdn4_2 rdn4_1 rdn4_0 rdf4_4 rdf4_3 rdf4_2 rdf4_1 rdf4_0 rbw4 rt4_1 rt4_0 reset ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
10-22 sa-1110 developer ? s manual memory and pcmcia control module bits name description 1..0 rtx 1..0 rom type. 00 ? nonburst rom or flash memory. 01 ? nonburst rom or sram for ncs 2:0 variable latency i/o for ncs 5:3. 10 ? burst-of-four rom or flash (with nonburst writes). 11 ? burst-of-eight rom or flash (with nonburst writes). all four types support reads of any burst length. burst-of-four and burst-of-eight types refer to the use of burst read timings, where modulo four or eight addresses within a burst require the same access times as nonburst reads, but shorter access times are allowed for every other beat. read bursts are always address aligned to their burst length. 2rbwx rom bus width. 0 ? 32 bits 1 ? 16 bits on hardware or sleep reset, the rbw0 field in msc0 is loaded with the inverse of the rom_sel pin. it can be subsequently overwritten. rbwx bits must remain clear if the corresponding chip selects are configured for synchronous mask rom (smrom). also, if ncs 0 is configured for smrom by holding the smrom_en pin high during hardware or sleep reset, the rom_sel pin must be held high. see section 10.3 for details on smrom configuration. 7..3 rdfx 4..0 rom delay first access. number of memory clock cycles (minus 2) from address to data valid for first read access to nonburst rom or flash, burst rom or flash, or sram. also, the number of memory clock cycles (minus 1) from address to data valid for subsequent read accesses to nonburst rom or flash, or sram; and the number of memory clock cycles (minus 1) of nwe assertion for write accesses (nonburst) to burst flash. for ncs 5:3 variable latency i/o, this determines the minimum number of memory clock cycles (minus 1) of noe (nwe) assert time for each beat of burst read (write). 12..8 rdnx 4..0 rom delay next access. number of memory clock cycles (minus 1) from address to data valid for subsequent accesses to burst rom or flash. also, the number of memory clock cycles (minus 1) of nwe assertion for write accesses to nonburst flash or sram. for ncs 5:3 variable latency i/o, this determines the minimum number of memory clock cycles (minus 1) of noe (nwe) deassert time between each beat of burst read (write). 15..13 rrrx 2..0 rom/sram recovery time. number of memory clock cycles (divided by 2) from chip select deasserted after a read to next chip select (of a different memory bank) or nras/nsdcs asserted. for flash, sram, and ncs 5:3 variable latency i/o this field will also be used after writes to hold off subsequent accesses. this field should be programmed with the maximum of toff, write pulse high time (flash/sram), and write recovery before read (flash). if the system is also configured for sdram or smrom using auto-power-down (see section 10.2.2 ), this field must be non-zero to ensure proper auto-power-up behavior for sdram or smrom accesses that follow accesses to this static memory bank.
sa-1110 developer ? s manual 10-23 memory and pcmcia control module 10.2.5 expansion memory (pcmcia) configuration register (mecr) mecr is a read/write register that contains control bits for configuring the timing of the pcmcia interface. this register is unaffected by reset; question marks indicate that the values are unknown at hardware or sleep reset. the programming of each of the six bs_xx fields allows the user to individually select the duration of accesses to i/o, common memory, and attribute memory for each of two pcmcia card slots. each bs_xx field is identical and represents the number of memory clocks per tick of an internal clock, referred to as bclk. bclk clocks the internal pcmcia state machine. see figure 10-25 for a description of the pcmcia timing diagram. when an access to a pcmcia address space is detected, the appropriate bs_xx field is selected based on the memory map. every (bs_xx + 1) memory clock cycles, a bclk tick is generated to advance the pcmcia state machine. all signals (except npwait, which is asynchronous) on the pcmcia bus are driven or sampled relative to this internal clock, although the clock itself is not driven. table 10-4 shows the number of processor clocks per bclk tick for each bs_xx value. table 10-5 shows the internal bclk cycle times for each bs_xx setting given a processor core frequency of 160 mhz (6.25-ns cycle time). note: the bclk speed for a given setting will change if the processor frequency changes. 0h a000 0018 mecr read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 fast1 bsm1_4 bsm1_3 bsm1_2 bsm1_1 bsm1_0 bsa1_4 bsa1_3 bsa1_2 bsa1_1 bsa1_0 bsio1_4 bsio1_3 bsio1_2 bsio1_1 bsio1_0 fast0 bsm0_4 bsm0_3 bsm0_2 bsm0_1 bsm0_0 bsa0_4 bsa0_3 bsa0_2 bsa0_1 bsa0_0 bsio0_4 bsio0_3 bsio0_2 bsio0_1 bsio0_0 reset ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? (sheet 1 of 2) bits name description 4..0 bsio0 4..0 memory clock count for accesses to pcmcia card slot 0, i/o space. 9..5 bsa0 4..0 memory clock count for accesses to pcmcia card slot 0, attribute space. 14..10 bsm0 4..0 memory clock count for accesses to pcmcia card slot 0, common memory space. 15 fast0 fast mode bit for access to slot 0 i/o, attribute, or memory. if fast0=1, the set-up time from address generated signals (a, npreg, psktsel and npce) to initial assertion of the read or write strobe (npwe, npiow, npoe, or npior) is 1*(bs_xx + 1) + 1 instead of the normal 3*(bs_xx + 1) + 1. during i/o accesses, the npce set-up time is always reduced from these values by any a-to-niois16 delay. the set-up time from address generated signals to the assertion of the read or write strobe for the second half of a 16-bit access to 8-bit i/o is 2*(bs_xx + 1) instead of 1*(bs_xx + 1). the duration of the read or write strobe remains 3*(bs_xx + 1), regardless of the value of fast0. 20..16 bsio1 4..0 memory clock count for accesses to pcmcia card slot 1, i/o space. 25..21 bsa1 4..0 memory clock count for accesses to pcmcia card slot 1, attribute space. 30..26 bsm1 4..0 memory clock count for accesses to pcmcia card slot 1, common memory space.
10-24 sa-1110 developer ? s manual memory and pcmcia control module to calculate the recommended bs_xx value for each address space: divide the command width time (the greater of twiowr and twiord, or the greater of twwe and twoe) by processor cycle time; divide by 2; divide again by 3 (number of bclk ? s per command assertion); round up to the next whole number; and subtract 1. for example, for a processor cycle time of 6.25 ns and an niowr command assertion time of 165 ns, the recommended setting for bs_io would be (165 /(2 x 3 x 6.25)) - 1 = 3.4, or 4 after rounding up. 31 fast1 fast mode bit for access to slot 1 i/o, attribute, or memory. if fast1=1, the set-up time from address generated signals ( a , npreg , psktsel and npce ) to initial assertion of the read or write strobe ( npwe , npiow , npoe , or npior ) is 1*(bs_xx + 1) + 1 instead of the normal 3*(bs_xx + 1) + 1. during i/o accesses, the npce set-up time is always reduced from these values by any a -to- niois16 delay. the set-up time from address generated signals to the assertion of the read or write strobe for the second half of a 16-bit access to 8-bit i/o is 2*(bs_xx + 1) instead of 1*(bs_xx + 1). the duration of the read or write strobe remains 3*(bs_xx + 1), regardless of the value of fast1. table 10-4. bs_xx bit encoding bit name description 4..0 bs_xx 0b00000 ? bclk= 2 processor clocks (clk/2) 0b00001 ? bclk= 4 processor clocks 0b00010 ? bclk= 6 processor clocks .... 0b11101 ? bclk= 60 processor clocks 0b11110 ? bclk= 62 processor clocks 0b11111 ? bclk= 64 processor clocks table 10-5. bclk speeds for 160-mhz processor core frequency bs_xx bclk cycle time ? ns 0b00000 ? every 2 processor clocks (clk/2). 0b00001 ? every 4 processor clocks. 0b00010 ? every 6 processor clocks. 0b00011 ? every 8 processor clocks. ... 0b11111 ? every 64 processor clocks. 12.5 25 37.5 50 400 0h a000 0018 mecr read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 fast1 bsm1_4 bsm1_3 bsm1_2 bsm1_1 bsm1_0 bsa1_4 bsa1_3 bsa1_2 bsa1_1 bsa1_0 bsio1_4 bsio1_3 bsio1_2 bsio1_1 bsio1_0 fast0 bsm0_4 bsm0_3 bsm0_2 bsm0_1 bsm0_0 bsa0_4 bsa0_3 bsa0_2 bsa0_1 bsa0_0 bsio0_4 bsio0_3 bsio0_2 bsio0_1 bsio0_0 reset ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? (sheet 2 of 2) bits name description
sa-1110 developer ? s manual 10-25 memory and pcmcia control module 10.3 smrom configuration register (smcnfg) smcnfg is a read/write register and contains control bits for configuring smrom. both smrom banks within a pair (ncs 1:0 or ncs 3:2) must be implemented with the same type of device, but the two bank pairs may differ. question marks indicate that the values are unknown at hardware or sleep reset. if any of the ncs(3:0) banks is configured for synchronous mask rom (smrom) via smcnfg:sm 3:0, the corresponding half-words of msc0 and/or msc1 are ignored. note: upon hardware or sleep reset, sm0 is set to the value of the smrom_en pin. 0h a000 0030 smcnfg read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rl2 cl22 cl21 cl20 reserved ra22 ra21 ra20 reserved sm3 sm2 rl0 cl02 cl01 cl00 reserved ra02 ra01 ra00 reserved sm1 sm0 reset ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0 0 1 1 0 0 ? ? ? ? ? 1 0 0 ? ? 0 * * upon hardware or sleep reset, sm0 is set to the value of the smrom_en pin. (sheet 1 of 3) bits name description 1..0 sm 1..0 smrom enables for bank 1 (bit 1) and bank 0 (bit 0). 0 - bank is not smrom enabled. 1 - bank is smrom enabled. sm0 is set upon hardware or sleep reset if the smrom_en pin is held high. 3..2 ? reserved. 6..4 ra0 2..0 smrom row address bit count for bank pair 0/1. 0xx - reserved. 100 - 13 row address bits, supports 13x11, 13x10, 13x9, 13x8. 101 - reserved. 11x - reserved. see table 10-7 for a description of dram or smrom row/column address multiplexing. 11..7 ? reserved. 14..12 cl0 2..0 cas latency for bank pair 0/1. it is the number of external sdclk cycles between reception of the read command and latching of the data. the unit size for cl0 is the external sdclk cycle: when smrom is run at half the memory clock frequency (mdrefr:k0db2 = 1), the delay is 2*cl0 internal memory cycles. 000 - reserved. 001 - 2 clocks. 010 - 3 clocks. 011 - 4 clocks. 100 - 5 clocks. 101 - 6 clocks. 110 - 7 clocks. 111 - reserved. hardware or sleep reset forces cl0=100. if smrom_en=1, cl0 must be maintained at this value to avoid a mismatch in cas latency between the sa-1110 and boot smrom following a subsequent hardware or sleep reset.
10-26 sa-1110 developer ? s manual memory and pcmcia control module 15 rl0 ras latency for bank pair 0/1. it is the ras-to-cas delay (number of external sdclk cycles between act command and read command). the unit size for rl0 is the external sdclk cycle: when smrom is run at half the memory clock frequency (mdrefr:k0db2 = 1), the delay is 2*rl0 internal memory cycles. see section 10.3.1 for description of the software sequence required whenever changing the ras latency. 0 - 1 clock. 1 - 2 clock. hardware or sleep reset forces rl0=1. if smrom_en=1, rl0 must be maintained at this value to avoid a mismatch in ras latency between the sa-1110 and boot smrom following a subsequent hardware or sleep reset. 17..16 sm3..2 smrom enables for bank 3 (bit 17) and bank 2 (bit 16). 0 - bank is not smrom enabled. 1 - bank is smrom enabled. 19..18 ? reserved. 22..20 ra2 2..0 smrom row address bit count for bank pair 2/3. 0xx - reserved. 100 - 13 row address bits, supports 13x11, 13x10, 13x9, 13x8. 101 - reserved. 11x - reserved. see table 10-7 for a description of dram or smrom row/column address multiplexing. 27..23 ? reserved. 30..28 cl2 2..0 cas latency for bank pair 2/3. it is the number of external sdclk cycles between reception of the read command and latching of the data. the unit size for cl2 is the external sdclk cycle: when smrom is run at half the memory clock frequency (mdrefr:k0db2 = 1), the delay is 2*cl2 internal memory cycles. 000 - reserved. 001 - 2 clocks. 010 - 3 clocks. 011 - 4 clocks. 100 - 5 clocks. 101 - 6 clocks. 110 - 7 clocks. 111 - reserved. 0h a000 0030 smcnfg read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rl2 cl22 cl21 cl20 reserved ra22 ra21 ra20 reserved sm3 sm2 rl0 cl02 cl01 cl00 reserved ra02 ra01 ra00 reserved sm1 sm0 reset ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0 0 1 1 0 0 ? ? ? ? ? 1 0 0 ? ? 0 * * upon hardware or sleep reset, sm0 is set to the value of the smrom_en pin. (sheet 2 of 3) bits name description
sa-1110 developer ? s manual 10-27 memory and pcmcia control module 15 rl0 ras latency for bank pair 0/1. it is the ras-to-cas delay (number of external sdclk cycles between act command and read command). the unit size for rl0 is the external sdclk cycle: when smrom is run at half the memory clock frequency (mdrefr:k0db2 = 1), the delay is 2*rl0 internal memory cycles. see section 10.3.1 for description of the software sequence required whenever changing the ras latency. 0 - 1 clock. 1 - 2 clock. hardware or sleep reset forces rl0=1. if smrom_en=1, rl0 must be maintained at this value to avoid a mismatch in ras latency between the sa-1110 and boot smrom following a subsequent hardware or sleep reset. 17..16 sm3..2 smrom enables for bank 3 (bit 17) and bank 2 (bit 16). 0 - bank is not smrom enabled. 1 - bank is smrom enabled. 19..18 ? reserved. 22..20 ra2 2..0 smrom row address bit count for bank pair 2/3. 0xx - reserved. 100 - 13 row address bits, supports 13x11, 13x10, 13x9, 13x8. 101 - reserved. 11x - reserved. see table 10-7 for a description of dram or smrom row/column address multiplexing. 27..23 ? reserved. 30..28 cl2 2..0 cas latency for bank pair 2/3. it is the number of external sdclk cycles between reception of the read command and latching of the data. the unit size for cl2 is the external sdclk cycle: when smrom is run at half the memory clock frequency (mdrefr:k0db2 = 1), the delay is 2*cl2 internal memory cycles. 000 - reserved. 001 - 2 clocks. 010 - 3 clocks. 011 - 4 clocks. 100 - 5 clocks. 101 - 6 clocks. 110 - 7 clocks. 111 - reserved. 0h a000 0030 smcnfg read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rl2 cl22 cl21 cl20 reserved ra22 ra21 ra20 reserved sm3 sm2 rl0 cl02 cl01 cl00 reserved ra02 ra01 ra00 reserved sm1 sm0 reset ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0 0 1 1 0 0 ? ? ? ? ? 1 0 0 ? ? 0 * * upon hardware or sleep reset, sm0 is set to the value of the smrom_en pin. (sheet 2 of 3) bits name description
10-28 sa-1110 developer ? s manual memory and pcmcia control module 10.3.1 changing smrom ras latency whenever smrom ras latency is changed, a careful software sequence is required to coordinate the sa-1110 with the smrom devices. otherwise, code fetches and/or data loads may be corrupted by discrepancies between the contents of smcnfg, mdcas, and mode registers inside the smrom. the following sequence is appropriate for changing the ras latency of bank pair 0/1 while it is serving instruction fetches (for example, during boot code following hardware or sleep reset). a similar sequence is required for changing ras latency of either bank pair when it is not serving instruction fetches. the objective is to fetch and execute store instructions for changing smcnfg and mdcas without any intervening smrom reads. 1. without changing ras latency, enable burst reads from smrom. a. write mdcas00, mdcas01, and mdcas02 with present number of leading 1 ? s, but filled through the 96th bit with the 2-bit repeating pattern of "0" followed by "1" (see section 10.2.3.2 for explanation). b. force a mode register set (mrs) command by writing smcnfg with its present value. the mrs configures the smroms ? internal mode registers for a burst length of eight. 2. if the instruction cache is not already enabled, enable it by setting bit 12 of the coprocessor 15 control register (see chapter 5 and chapter 6 ). this causes subsequent fetches to be performed as 8-word bursts. 3. align the store instruction which alters smcnfg:rl0 to an 8-word address boundary. locate the store instructions that alter mdcas00, mdcas01, and mdcas02 at the subsequent three addresses. aligning the four instructions to the start of a cache line ensures that they are fetched together and executed prior to the next smrom read. the store to smcnfg will cause another mrs command, which configures the desired ras and cas latencies. 31 rl2 ras latency for bank pair 2/3 it is the ras-to-cas delay (number of external sdclk cycles between act command and read command). the unit size for rl2 is the external sdclk cycle: when smrom is run at half the memory clock frequency (mdrefr:k0db2 = 1), the delay is 2*rl2 internal memory cycles. see section 10.3.1 for description of the software sequence required whenever changing the ras latency. 0 - 1 clock 1 - 2 clocks 0h a000 0030 smcnfg read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rl2 cl22 cl21 cl20 reserved ra22 ra21 ra20 reserved sm3 sm2 rl0 cl02 cl01 cl00 reserved ra02 ra01 ra00 reserved sm1 sm0 reset ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0 0 1 1 0 0 ? ? ? ? ? 1 0 0 ? ? 0 * * upon hardware or sleep reset, sm0 is set to the value of the smrom_en pin. (sheet 3 of 3) bits name description
sa-1110 developer ? s manual 10-29 memory and pcmcia control module 10.4 dynamic interface operation this section describes the dynamic memory interface. 10.4.1 dram overview the dynamic memory interface supports up to four banks, organized as two bank pairs. both banks within a pair must have the same dram size, configuration, timing type, and data bus width. initialization software must set up the memory interface configuration registers with the dram timing type, data bus width, number of row address bits, ncas/dqm waveforms, and timing parameters. the sa-1110 generates accesses of 1-8 words. table 10-6 shows some of the supported dram configurations. table 10-7 shows the dram row/column address multiplexing. for each row size, ras time to cas time address bit changes only occur if they are required; all other bits (including a 25 and a 9:0 bits not shown here) remain driven by the corresponding internal address bits throughout the transfer. column address sizes of 12, 11, 10, 9, and 8 are supported if three conditions are met: table 10-6. some dram memory size options bank size (mbyte/bank) dram configuration (words x bits) chip size number chips / bank row bits x column bits maximum memory (4 banks, 32-bit bus) total number of chips 16-bit bus 32-bit bus 16-bit bus 32-bit bus 16-bit bus 32-bit bus 16-bit bus 32-bit bus 512 kbyte 1 mbyte 256 k x 16 4 mbit 1 2 9 x 9 10 x 8 2 mbyte 4 mbyte 48 1 mbyte 2 mbyte 512 k x 8 4 mbit 2 4 10 x 9 4 mbyte 8 mbyte 816 2 mbyte 4 mbyte 1 m x 4 4mbit 4 8 10 x 10 8 mbyte 16 mbyte 16 32 2 mbyte 4 mbyte 1 m x 16 16 mbit 1 2 10 x 10 12 x 8 8 mbyte 16 mbyte 48 4 mbyte 8 mbyte 2 m x 8 16 mbit 2 4 11 x 10 12 x 9 16 mbyte 32 mbyte 816 8 mbyte 16 mbyte 4 m x 4 16 mbit 4 8 11 x 11 12 x 10 32 mbyte 64 mbyte 16 32 8 mbyte 16 mbyte 4 m x 16 64 mbit 1 2 11 x 11 12 x 10 13 x 9 14 x 8 32 mbyte 64 mbyte 48 16 mbyte 32 mbyte 8 m x 8 64 mbit 2 4 12 x 11 13 x 10 14 x 9 64 mbyte 128 mbyte 816 32 mbyte 64 mbyte 16 m x 4 64 mbit 4 8 12 x 11 13 x 11 14 x 10 128 mbyte 256 mbyte 16 32 32 mbyte 64 mbyte 16 m x 16 256 mbit 1 2 15 x 9 128 mbyte 256 mbyte 48 64 mbyte 128 mbyte 32 m x 8 256 mbit 2 4 15 x 10 256 mbyte 512 mbyte 816 128 mbyte n/a 64 m x 4 256 mbit 4 n/a 15 x 11 512 mbyte n/a 16 n/a
10-30 sa-1110 developer ? s manual memory and pcmcia control module  the row address is larger than or same size as the column address  the combined row and column address size does not exceed the maximum bank size that can be implemented with 4-bit dram chip organizations  the combined row and column address size does not exceed the 128-mbyte architectural bank size. the user does not explicitly specify the column address size; connecting the address lines to the dram devices as shown allows proper addressing. the column address multiplexing differs for 16-bit (shown in parentheses) and 32-bit data busses. when accessing sdram, only dra 9:0 (and possibly dra11) are used for column addressing. dra10 is driven with "0" or "1" to help encode the read, readap, writ, and writeap commands. dra 14:12 (and possibly dra11) maintain the upper bits of the row address, which includes the sdram internal bank number. during sdram configuration, in between any read or write accesses, all of the address pins are used to transfer the mrs command. drax = sa-1110 dram interface address pin, a 24:10 = dra 14:0 iax = internal address bit iax = internal address bit driven during cas time to specify internal bank number (sdram only) note: at ras time, all address pins, a 25:0, are driven by the same bit numbers of the internal address. thus, for a given number of mdcnfg:drac0,2 programmed row address bits, higher bit numbers (a 25) can be used by connecting them to the appropriate dram address pins. however, this causes the corresponding internal address bits (ia25) to be used during both ras and cas and creates nonaddressable locations in the physical memory. if these higher row address bit numbers must be used, column addresses must be limited to a maximum of 8 bits (9 if using a 16-bit data bus). in general, dram that utilize fewer than these 8 column address bits can be used, but there will be holes in the memory map because the system ignores the still significant internal address bit ia9. when configured for a 16-bit data bus, 9 column address bits must be used to avoid memory map holes: this prohibits the use of x16 organized 16mbit and 64mbit sdram on 16-bit data busses. table 10-7. dram or smrom row/column address multiplexing number of row address bits (including sdram bank selects) dram or smrom address pins at ras time dram or smrom address pins at cas time dra 14:0 = ia 24:10 dra14 dra13 (ba0) dra12 (ba1) dra11 (ba) dra10 (ap) dra9 dra8 dra 7:0 15 bits ia 24:10 ia24 ia23 ia22 ia21 (ia26) ia20 ia26 (ia25) ia25 (ia9) ia 9:2 (ia 8:1) 14 bits ia 24:10 ia24 ia23 ia22 ia21 ia20 ia25 (ia24) ia24 (ia9) ia 9:2 (ia 8:1) 13 bits ia 24:10 ia24 ia23 ia22 ia21 ia25 (ia24) ia24 (ia23) ia23 (ia9) ia 9:2 (ia 8:1) 12 bits ia 24:10 ia24 ia23 ia22 ia25 (ia24) ia21 ia24 (ia23) ia23 (ia22) ia22 (ia9) ia 9:2 (ia 8:1) 11 bits ia 24:10 ia24 ia23 ia22 ia21 ia23 (ia22) ia22 (ia21) ia21 (ia9) ia 9:2 (ia 8:1) 10 bits ia 24:10 ia24 ia23 ia22 ia21 ia20 ia21 (ia20) ia20 (ia9) ia 9:2 (ia 8:1) 9 bits ia 24:10 ia24 ia23 ia22 ia21 ia20 ia19 ia19 (ia9) ia 9:2 (ia 8:1)
sa-1110 developer ? s manual 10-31 memory and pcmcia control module 10.4.2 dram timing the dram ncas/dqm timing is generated using rotate registers. the rate at which these rotate registers are clocked is determined by mdcnfg:cdb20,2 and mdcnfg:dwid0,2. the time at which to sample the read data is programmable to coincide with the deassertion of ncas/dqm or up to 3 cpu cycles later. this method provides a way to take advantage of the edo dram while still supporting the fpm dram. a full burst ncas/dqm waveform is specified, and the memory interface controller rotates the waveform rotate register once every cpu clock cycle (if cdb20,2=0 and dwid0,2=0) or once every 2 cpu clock cycles (if cdb20,2=1 or dwid0,2=1). the rotating continues until the number of ncas/dqm pulses have been generated that corresponds to the actual number of data words being accessed. register set mdcas00/mdcas01/mdcas02 or mdcas20/mdcas21/mdcas22 are programmed to contain the ncas/dqm waveform for a full burst access (8-beat for 32-bit data busses and 16-beat for 16-bit data busses). to begin an access, the row address is output on dra(14:0), which is a(24:10). one cpu clock later (one-half memory clock), nras/nsdcs is asserted and the ncas/dqm waveform begins and is rotated with each cpu clock, if cdb20,2=0 and dwid0,2=0. a "1" in these rotate registers drives ncas/dqm high (deasserts) at the rising edge of the cpu clock cycle, and a "0" drives ncas/dqm low (asserts). the column address for the first beat of data will be valid 1 cpu cycle before ncas/dqm transitions from deasserted to asserted. during reads, a rising edge is detected on the ncas/dqm waveform and input data is latched mdcnfg:tdl0, 2 cycles after the rising edge. the rotate register continues to rotate until the number of ncas/dqm pulses equals the burst size of the current transaction. for writes, nras/nsdcs will be deasserted on the next rising memory clock cycle edge after the last ncas/dqm rising edge (either 1 or 2 cpu clock cycles). for reads, nras/nsdcs will be deasserted on the rising memory clock cycle edge that occurs 2 or 3 cpu clock cycles after the input data is latched. for each additional beat after the first, the column address will be updated coincident with the deassertion of ncas/dqm, or 1 cpu cycle later. for writes, the write data outputs will follow the same timing as the column address. nwe and noe, as appropriate, follow the same timing as nras/nsdcs. after nras/nsdcs is deasserted, the timing parameter mdcnfg:trp0,2 is used to determine the wait before the next assertion of nras/nsdcs. if cdb20,2=1 or dwid0,2=1, the ncas/dqm waveform will be rotated every memory clock, or every 2 cpu cycles. the timing of the other signals remains the same relative to the ncas/dqm waveform. for cdb20,2=0 and dwid0,2=0, there is a requirement that ncas/dqm high and low times be programmed with a minimum of 2 bits and the 4 least significant bits in mdcas00 and mdcas20 must be "1". for cdb20,2=1 or dwid0,2=1, the high and low ncas/dqm pulse times may be 1 bit each and the least significant 2 bits of mdcas00 or mdcas20 must be "1". these requirements are necessary for the internal hardware to properly generate addresses and write data and for proper address and data setup times.
10-32 sa-1110 developer ? s manual memory and pcmcia control module figure 10-5 shows the rate of the shift registers during dram ncas timing for a single-beat transaction. figure 10-5. dram single-beat transactions a6633-02 cpu clock memory clock addr reads: noe trp+1 nras ncas read rd/nwr col d0 row row writes: read data write rd/nwr contents of dram register fields: mdcas0 1 = 11 0001 1000 1100 (binary) mdcas0 0 = 0110 0011 0001 1000 1100 0110 0000 0111 (binary) mdcnfg:trp0 = 4 mdcnfg:cdb20 = 1 tdl0 = 00 nwe first last time write data do
sa-1110 developer ? s manual 10-33 memory and pcmcia control module figure 10-6 shows the rate of the shift registers during fpm or edo dram ncas timing for burst-of-eight transactions. figure 10-6. dram burst-of-eight transactions 10.4.3 sdram overview the sa-1110 supports most x4, x8, x16, and x32 sdram. there are fifteen multiplexed row/column address signals (dra14-0), four command select signals (nras/nsdcs 3:0), four data qualifiers for byte selection (ncas/dqm 3:0), thirty-two data signals (d 31:0), a write enable signal (nwe), a row address strobe (nsdras), a column address strobe (nsdcas), two memory clocks (sdclk 2:1), and a memory clock enable (sdcke 1). whenever an sdram bank is enabled, a mode register set (mrs) command is sent to the sdram devices. mrs commands always configure sdram internal mode registers for sequential (or linear) burst type and a burst length of one, while the cas latency is determined by the tdl0 or a6634-02 memory clock addr read data reads: nras noe read rd/nwr writes: write data write rd/nwr nwe ncas col d0 d1 d2 d3 d4 d5 d6 d7 col+4 col+8 col+12 col+16 col+20 col+24 col+28 d0 d1 d2 d3 d4 d5 d6 d7 row contents of dram register fields: mdcas01 = 11 0001 1000 1100 (binary) mdcas00 = 0110 0011 0001 1000 1100 0110 0000 0111 (binary) mdcnfg: trp0 = 4 mdcnfg: cdb20 = 1 tdl0 = 00 trp+1 first last time
10-34 sa-1110 developer ? s manual memory and pcmcia control module tdl2 field of mdcnfg. see table 10-6 and table 10-7 for a review of addressing, applicable to all types of dram. the upper one or two bits of row address act as selects for sdram internal banks. 10.4.4 sdram commands the sa-1110 accesses sdram by using the following subset of standard interface commands:  mode register set (mrs)  bank activate (act)  read (read)  read with auto-precharge (readap)  write (writ)  write with auto-precharge (writeap)  precharge all banks (pall)  auto-refresh (cbr)  power-down (pwrdn)  enter self-refresh (slfrsh)  exit power-down (pwrdnx)  no operation (nop) table 10-8 shows the sdram interface commands. table 10-8. sdram command encoding command sa-1110 pins sdcke (at clock n-1) sdcke (at clock n) nras/ nsdcs3:0 sdras sdcas nwe ncas/ dqm3:0 dra14-11, dra9-0 dra10 pwrdn 1 0 1 1 1 1 4 ? b1111 x x slfrsh 1 0 0 0 0 1 4 ? b0000 x x pwrdnx 0 1 1 1 1 1 4 ? b1111 x x cbr 1 1 0 0 0 1 4 ? b0000 x x mrs 1 x 0 0 0 0 4 ? b1111 mode (dra 14:7 = 8 ? b0 dra 6:4 = {1 ? b0, tdl}, dra 3 = 1 ? b0, dra 2:0 = 3 ? b000) act 1 x 0 0 1 1 4 ? b1111 bank, row read 1 x 0 1 0 1 x bank, column 0 readap 1 x 0 1 0 1 x bank, column 1 writ 1 x 0 1 0 0 mask bank, column 0 writeap 1 x 0 1 0 0 mask bank, column 1 pall 1 x 0 0 1 0 4 ? b1111 x 1 nop 1 x 1 x x x x x x nop 1 x 0 1 1 1 x x x
sa-1110 developer ? s manual 10-35 memory and pcmcia control module 10.4.5 sdram state machine figure 10-7 shows all possible sdram controller states and transitions. many of the states are named after the sdram commands with which they are coincident and have a fixed duration of one cycle. transitions from the other states are determined by the overall memory controller state and a few sdram power-down/self-refresh status/control bits. most of the states and transitions may involve multiple sdram devices and their internal banks. only those states shown below "idle" involve a single bank within a single sdram row. if none of the labeled transitions have their conditions satisfied and no default transition is indicated, the current state is maintained for at least one more cycle. a hardware or sleep reset causes the sdram state machine to enter the "self-refresh and clock-stop" state. then, it is software ? s responsibility to complete the appropriate reset procedure (see section 10.7.1 ). the ? clear_e1pin ? and ? clear_knrun ? transitions (indicated by dotted lines in figure 10-7 and achieved by clearing the e1pin, k1run, and/or k2run bits of mdrefr) are provided to allow ultimate software control of the sdram memory system ? s low-power modes. they should be used with extreme caution because the resulting states prohibit automatic transitions for mode register set, read, write, and refresh commands. the ? auto_power_down ? and ? auto_power_up ? transitions (made possible by setting the eapd and/or kapd bits of mdrefr) provide a completely automatic alternative for minimizing power consumption in the sdram memory system. the following prioritization is used for transitions out of the idle state. if enabled via the eapd and kapd bits, the "auto_power_down" transition occurs when none of the higher priority transitions are asserted. the "auto_power_up" transition occurs when "enter_sleep", "refresh", "new_enable", or "new_access" is asserted during the "power-down" state. high priority - "enter_sleep" "set_slfrsh" "clear_e1pin" "refresh" "new_enable" "new_access" low priority - "auto_power_down" when the internal system bus causes a new access, the state machine executes an act command. then the sa-1110 executes one read or write command for each beat of a burst access. the last (or single) beat uses the autoprecharge command (readap or writeap), but all preceding beats use the nonprecharge command (read or writ). figure 10-8 , figure 10-9 , and figure 10-10 show timing diagrams of sdram transactions.
10-36 sa-1110 developer ? s manual memory and pcmcia control module figure 10-7. sdram state machine a6635-01 power-down pwrdnx pwrdn pall cbr self-refresh and clock-stop self-refresh reset (hardware or sleep) !last_beat last_beat burst !burst enter_sleep || clear_knrun !enter_sleep && set_knrun power-down and clock-stop clear_knrun || auto_power_down set_knrun || (knrun && (auto_power_up || enter_sleep || set_slfrsh)) enter_sleep || set_slfrsh enter_sleep || set_slfrsh !enter_sleep && !clear_knrun && clear_slfrsh (set_e1pin || (e1pin && (auto_power_up || enter_sleep || set_slfrsh))) && !clear_knrun slfrsh act mrs !enter_sleep && !set_slfrsh && (clear_e1pin || auto_power_down) !enter_sleep && !set_slfrsh !enter_sleep && !set_slfrsh && !clear_e1pin && refresh && !first_refresh !enter_sleep && !set_slfrsh && !clear_e1pin && refresh && first_refresh !enter_sleep && !set_slfrsh && !clear_e1pin && !refresh && !new_enable && new_access !enter_sleep && !set_slfrsh && !clear_e1pin && !refresh && new_enable idle read or writ readap or writeap
sa-1110 developer ? s manual 10-37 memory and pcmcia control module figure 10-8. sdram 1-beat read/write/read timing for 4 bank x 4 m x 4 bit organization (64 mbit) a6636-02 cpu clock memory clock sdclk sdcke command dra13-12 dra11 dra10 dra9-0 nsdras nras/nsdcs nsdcas rd/nwr d0 d0 act readap act writeap act readap nwe d0 ncas/dqm contents of dram register fields: mdcnfg:dtim0=1 mdcnfg:dwid0=0 mdcas00=0101 0101 0101 0101 0101 0101 0101 0111(binary) mdcnfg:drac0=5 mdcnfg:cdb20=0 mdcnfg:trp0=1 mdcngf:tdl0=2 mdcnfg:twr0=3 d first last time bank bank bank row row row 12345678910111213141516171819202122 t rcd tdl trp+1 t rcd tdl+trp+2 trp+twr+1 row row row row col row col row col
10-38 sa-1110 developer ? s manual memory and pcmcia control module figure 10-9. sdram 1-beat read/write timing for 4 bank x 4 m x 4 bit organization (64 mbit) at half-memory clock frequency (mdrefr:kndb2=1)) a6700-02 cpu clock memory clock sdclk sdcke command dra13-12 dra11 dra10 dra9-0 nsdras nras/nsdcs nsdcas rd/nwr d0 nwe d0 ncas/dqm contents of dram register fields: mdcnfg:dtim0=1 mdcnfg:dwid0=0 mdcas00=0101 0101 0101 0101 0101 0101 0111 1111(binary) mdcnfg:drac0=5 mdcnfg:cdb20=0 mdcnfg:trp0=1 mdcngf:tdl0=2 mdcnfg:twr0=3 d first last time bank bank row row 12345678910111213141516171819202122 trp+1 row row col row col trcd trcd 2 * tdl (2 * tdl)+trp+2 act readap act writeap
sa-1110 developer ? s manual 10-39 memory and pcmcia control module figure 10-10. sdram 8-beat read/write timing for 4 bank x 4 m x 4 bit organization (64 mbit) a6637-02 cpu clock memory clock sdclk sdcke command dra13-12 dra11 dra10 dra9-0 ncas/dqm nsdras nras/nsdcs nsdcas nwe (writ) act act read writ read writ readap writeap d (read) rd/nwr (read) rd/nwr (writ) contents of dram register fields: mdcnfg:dtim0=1 mdcnfg:dwid0=0 mdcas00=0101 0101 0101 0101 0101 0101 0101 1111(binary) mdcnfg:drac0=5 mdcnfg:cdb20=0 mdcnfg:trp0=2 mdcngf:tdl0=2 mdcnfg:twr0=3 d (writ) first last time bank bank row row 12345678910111213141516171819202122 trcd tdl trp+1 nwe (read) row row row col col col col col col col col col c row col d0 d1 d2 d3 d4 d5 d6 d7 d0 d1 d0 d1 d2 d3 d4 d5 d6 d7 d d tdl+trp+2 trp+twr+1
10-40 sa-1110 developer ? s manual memory and pcmcia control module 10.4.6 dram/sdram refresh the sa-1110 provides support for cas before ras (cbr) refresh. when the dram interface is enabled (by setting any of mdcnfg:de3:0 and setting mdrefr:dri greater than zero), the refresh counter starts counting up every memory cycle (2 cpu cycles) from 0. when its value reaches the value in mdrefr:dri times 32, the memory controller is notified that a refresh cycle is due, the counter is cleared and resumes counting. after the current transaction completes, a refresh cycle is performed. all four ncas/dqm lines are driven low. two memory clock cycles later (4 cpu cycles), the four nras/nsdcs signals driven low. after mdrefr:trasr+1 memory clock cycles, all nras/nsdcs and ncas/dqm signals driven high and mdcnfg:trp0,2 is used to hold off subsequent dram accesses to allow for row precharge time. hardware or sleep reset clears the refresh counter. software and watchdog reset do not affect it. sdram cbr is performed simultaneously (and at the same interval) with the asynchronous dram cbr refresh. the nsdras and nsdcas signals are driven high in every cycle except the first one: in which all of the enabled nras/nsdcs are driven low. this is done to ensure that the sdram devices only receive nop commands while ncas/dqm and nras/nsdcs are being held low for asynchronous dram refresh. if the sa-1110 detects that this is its first refresh cycle after reset, a precharge all banks (pall) command is executed prior to the auto-refresh (cbr) command. a single (non-burst) read or write to any disabled dram bank causes one refresh cycle to all banks. refresh cycles continue to occur while the cpu is in idle mode. figure 10-11 shows a timing diagram of a cbr refresh cycle.
sa-1110 developer ? s manual 10-41 memory and pcmcia control module figure 10-11. dram/sdram cbr refresh cycle 10.4.7 dram/sdram self-refresh in sleep mode the sa-1110 puts the dram into the self-refresh state prior to entering sleep mode by driving all ncas/dqm low, then driving all nras/nsdcs low (just as for a normal cbr refresh cycle), and maintaining them low while core power (vdd) and clocks are turned off. the sdram self-refresh command (slfrsh) differs from auto-refresh command (cbr) in that slfrsh drives the sdcke 1:0 signals low. they will continue to be held low throughout sleep. sdclk 2:0 stop running throughout sleep: sdclk 2:1 are held high; sdclk 0 is held low if auto-power-down is enabled, or held high if auto-power-down is disabled. see section 9.5 for details on how to bring dram out of self-refresh mode. see section 10.4.5 and section 10.7.1 on page 64 for details on how to bring sdram out of self-refresh mode. an access to a dram bank while the dram interface is in self-refresh mode has undefined results, but the dram remains in self-refresh. a6638-01 cpu clock sdclk memory clock sdcke command dra13-12 dra11 dra10 dra9-0 nsdras nras/nsdcs nsdcas ncas/dqm pall cbr act sdram only nwe bank row row row 1234567891011121314151617181920 trasr+1
10-42 sa-1110 developer ? s manual memory and pcmcia control module if any of the dram require a full burst (all rows) cbr upon exiting self-refresh, the programmer may use repeated single (nonburst) accesses to any disabled dram bank. 10.5 static memory interface the static memory interface is comprised of six chip selects, ncs 5:0. ncs 2:0 are each configurable for nonburst rom or flash memory, burst rom or flash, or sram. ncs 5:3 are each configurable for nonburst rom or flash, burst rom or flash, or sram-like variable latency i/o devices. the variable latency i/o interface differs from sram in that it allows the use of data ready input signal, rdy, to insert a variable number of memory cycle wait states.the data bus width for each chip select region may be programmed to be 16-bit or 32-bit. ncs 3:0 are also configurable for smrom, but only for 32-bit data busses. noe is asserted for all reads. nwe is asserted for flash and sram writes. for sram and variable latency i/o implementations, ncas/dqm 3:0signals are used for the byte enables, where ncas/dqm 3 corresponds to the msb. the sa-1110 supplies 26 bits of byte address (a 25:0) for access of up to 64 mbytes per chip select. a 0 is not used in 16-bit wide bus systems and a 1:0 are not used in 32-bit wide systems. the rt fields in the mscx registers specify the type of memory: nonburst rom or flash; nonburst rom, sram, or variable latency i/o; burst-of-four rom or flash; or burst-of-eight rom or flash. the rbw fields specify the bus width for the memory space selected by ncs 5:0. if a 16-bit bus width is specified, transactions take place across data pins d 15:0. the smrom_en pin and/or smcnfg register must be used to configure ncs 3:0 for smrom. table 10-9 provides a comparison of supported static memory types. table 10-9. summary of static memory and variable latency i/o capabilities mscx: rt device type chip selects directions supported for single internal transfers directions supported for burst internal transfers timing (memory clocks) burst read address assert noe assert burst noe de- assert burst write address assert nwe assert burst nwe de- assert 00 nonburst rom or flash ncs 5:0 reads, writes reads rdf+1 rdf+1 0 n/a rdn+1 n/a 01 nonburst rom or sram ncs 2:0 reads, writes reads, writes rdf+1 rdf+1 0 rdn+2 rdn+1 1 01 variable latency i/o ncs 5:3 reads, writes reads, writes rdf+ rdn+2+ waits rdf+1+ waits rdn+1 rdf+ rdn+2+ waits rdf+1+ waits rdn+1 10 burst-of-4 rom or flash (nonburst writes) ncs 5:0 reads, writes reads rdf+1 (0,4) rdn+1 (1:3, 5:7) rdf+1 (0,4) rdn+1 (1:3, 5:7) 0 n/a rdf+1 n/a 11 burst-of-8 rom or flash (nonburst writes) ncs 5:0 reads, writes reads rdf+1 (0) rdn+1 (1:7) rdf+1 (0) rdn+1 (1:7) 0 n/a rdf+1 n/a
sa-1110 developer ? s manual 10-43 memory and pcmcia control module 10.5.1 rom interface overview the sa-1110 provides programmable timing for both burst and non-burst roms. the rdf field in mscx is the latency (in memory clock cycles) for the first and all subsequent data beats from nonburst roms, and the first data beat from a burst rom. rdn is the latency for the burst data beats after the first for burst roms. rrr delays the following access to a different memory space to allow time for the current rom to tristate the data bus. this parameter should be programmed with the maximum t off value, as specified by the rom manufacturer. one memory clock cycle is always added to rdf and rdn. one memory clock cycle is added to rrr if it was set to zero, otherwise it is doubled. upon hardware or sleep reset, msc0 15:0 is initialized such that the rdf, rdn and rrr fields are set to their maximum values to accommodate the slowest nonburst roms at initial boot, rt is set to be nonburst rom, and rbw0 is loaded with the value of the inverse of the rom_sel pin. the remaining fields in msc0, msc1, and msc2 are not initialized on hardware or sleep reset. msc0 15:0 is selected when the address space corresponding to ncs0 is accessed. the sa-1110 supports a rom burst size of 1, 4 or 8. a single cbr refresh cycle, for asynchronous dram and/or sdram, may be inserted between word accesses within a burst transaction. ncs and noe are deasserted during the refresh cycle. 10.5.2 rom timing diagrams and parameters figure 10-12 , figure 10-13 , and figure 10-14 show the timing for burst and nonburst roms. figure 10-12. burst-of-eight rom or flash read timing diagram a6639-02 memory clock ncs0 rdn+1 a[25:5] a[4:2] ncs1 noe rd/nwr 0123456 7 rdn+1 rdn+1 rdn+1 rdn+1 rdn+1 rdn+1 rdf+1.5 rdf+2 max* (2*rrr,1) contents of static memory register fields: msc0:rdf0=8 msc0:rdn0=4 msc0:rrr0=2 input data
10-44 sa-1110 developer ? s manual memory and pcmcia control module figure 10-13. eight-beat burst read from burst-of-four rom or flash a6640-02 memory clock ncs0 rdn+1 a[25:5] a[3:2] ncs1 noe rd/nwr a[4] 0123 01 3 2 rdn+1 rdn+1 rdf+1 rdn+1 rdn+1 rdn+1 rdf+1.5 rdf+2 max* (2*rrr,1) contents of static memory register fields: msc0:rdf0=8 msc0:rdn0=4 msc0:rrr0=2 input data
sa-1110 developer ? s manual 10-45 memory and pcmcia control module figure 10-14. nonburst rom, sram, or flash read timing diagram ? four data beats) a6641-02 memory clock ncs0 a[25:0] ncs1 noe rd/nwr ncas[3:0] (sram only) a0 a1 a2 rdf+1 rdf+1 rdf+1 max* (2*rrr,1) contents of static memory register fields: msc0:rdf0=7 msc0:rrr0=2 read (input) data rdf+1.5 rdf+2 a3
10-46 sa-1110 developer ? s manual memory and pcmcia control module 10.5.3 sram interface overview the sa-1110 provides a 16-bit or 32-bit asynchronous sram interface that uses the ncas/dqm pins for byte selects on both reads and writes. ncs 2:0 select the sram bank, noe is asserted on reads and nwe is asserted on writes. address bits a 25:2 provide addressability of up to 64mbytes of sram per bank. the sa-1110 supports systems with both sram and dram (synchronous or asynchronous) by ensuring at least one-and-a-half memory clocks of ncas/dqm 3:0 deassertion between any permutation of sram (or variable latency i/o) access and dram activity (access, cbr, or self-refresh). however, the recovery time between sram accesses (rrr 2:0) must be set to satisfy the minimum ncas/dqm 3:0 deassertion time for any asynchronous dram present in the system. the timing for a read access is identical to that for a nonburst rom (see section 10.5.2 ). the rdf fields in the mscx registers are the latency for a read access. the mscx:rdn field controls the nwe low time during a write cycle. mscx:rrr is either the time from ncs deassertion after a read to the start of an access from a different memory bank, or the time from ncs deassertion after a write to the start of any other memory access (read or write, same or different bank). the mscx:rrr delay is not applied between subsequent reads from the same bank. mscx:rt must select sram. a single cbr refresh cycle, for asynchronous dram and/or sdram, may be inserted between word accesses within a burst transaction. ncs, noe, and nwe are deasserted during the refresh cycle. 10.5.4 sram timing diagrams and parameters as shown in figure 10-13 , sram reads have the same timing as nonburst roms, except ncas/dqm 3:0 are used as byte selects and are asserted with the same timing as ncs. when ncas/dqm0 is low (asserted), d 7:0 will be used to transfer data. when ncas/dqm1 is low, d 15:8 is used, and so forth. during writes, all 32 data pins are actively driven by the sa-1110 (that is, they are not tristated) regardless of the state of the individual ncas/dqm pins. figure 10-15 shows the timing for sram writes.
sa-1110 developer ? s manual 10-47 memory and pcmcia control module figure 10-15. sram write timing diagram (4 ? beat burst) in figure 10-15 some of the parameters are defined as follows: tas = address setup to ncs = 1 cpu cycle tces = ncs, ncas/dqm setup to nwe = 2 memory clock cycles (4 cpu cycles) tasw = address setup to nwe low (asserted) = 1/2 memory cycle (1 cpu cycle) [for a 25:5, tasw=5 cpu cycles. for a 4:2, tasw=1 cpu cycle for subsequent beats in a burst] tdswh = write data setup to nwe high (deasserted) = 1/2 memory cycle + (rdn+1) memory cycles tdh = data hold after nwe high (deasserted) = 1/2 memory cycle (1 cpu cycle) tceh = ncs, ncas/dqm held asserted after nwe deasserted = 1 memory clock cycle (2 cpu cycles) tah = address hold after nwe deasserted = 1/2 memory cycle (1 cpu cycle) nwe high time between burst beats = 1 memory cycle (2 cpu cycles) a6643-02 memory clock t as t ah t dswh t asw t ceh max(2*rrr,1) a[25:0] ncs0 d[31:0] ncas[3:0] nwe rd/nwr a0 d0 d1 d2 d3 a0+4 a0+8 a0+12 t dh t ces rdn+1 rdn+1 rdn+1 rdn+1 contents of static memory register fields: msc0: rdn0=2 msc0:rrr0=2
10-48 sa-1110 developer ? s manual memory and pcmcia control module 10.5.5 variable latency i/o interface overview variable latency i/o read accesses differ from sram read accesses in that noe toggles for each beat of a burst. the first noe assertion occurs two memory cycles after the assertion of chip select ncs 3, ncs 4, or ncs 5. both reads and writes differ from sram in that the sa-1110 starts sampling the data ready input (rdy) at rdf-1 memory cycles after assertion of noe or nwe: two (2) memory cycles prior to end of minimum noe or nwe assertion. samples are taken every half memory cycle until three consecutive samples (at rising, falling, and rising edges of the memory clock) indicate that the i/o device is ready for data transfer. rdy can be tied high to cause a zero-wait-state i/o access. read data is latched one-half memory cycle after the third successful sample (on falling edge). noe or nwe is deasserted on the next rising edge and the address may change on the subsequent falling edge. prior to a subsequent data beat noe or nwe will remain deasserted for rdn+1 memory cycles. the chip select and byte selects, ncas/dqm 3:0, will remain asserted for one memory cycle after the burst ? s final noe or nwe deassertion. a single cbr refresh cycle, for asynchronous dram and/or sdram, may be inserted between word accesses within a burst transaction. ncs, noe, and nwe are deasserted during the refresh cycle. the dram refresh interval must be adjusted to account for the longest variable latency i/o access time (see section 10.2.2 ). because the longest access time includes the maximum number of wait cycles caused by deassertion of the rdy pin, indefinitely long deassertions will prevent refresh and may corrupt the dram contents. 10.5.6 variable latency i/o timing diagrams and parameters figure 10-16 shows the timing for variable latency i/o reads and figure 10-17 shows the timing for variable latency i/o writes.
sa-1110 developer ? s manual 10-49 memory and pcmcia control module figure 10-16. variable latency i/o read timing (burst-of-four, with one wait cycle per beat) a6654-02 cpu clock memory clock a(25:0) ncs4 nwe rd/nwr d(31:0) rdy noe d1 d0 d2 d3 t as t ces t asrw0 rdf+1+waits rdn+1 t ceh max(2*rrr,1) t ah t asrwn a0 a0+4 a0+8 a0+12 ncas[3:0]
10-50 sa-1110 developer ? s manual memory and pcmcia control module figure 10-17. variable latency i/o write timing (burst-of-four, with one wait cycle per beat) in figure 10-16 and figure 10-17 , some of the parameters are defined as follows: tas = address setup to ncs = 1 cpu cycle tces = ncs, ncas/dqm setup to noe or nwe = 2 memory clock cycles (4 cpu cycles) tasrw0 = address setup to noe or nwe low (asserted) = 2.5 memory cycles on first beat tasrwn = address setup to noe or nwe low (asserted) = (rdn+0.5) memory cycles on subsequent beats tdswh,min = minimum write data setup to nwe high (deasserted) = (rdf+1.5) memory cycles tdh = data hold after nwe high (deasserted) = 1/2 memory cycle (1 cpu cycle) tceh = ncs, ncas/dqm held asserted after noe or nwe deasserted = 1 memory clock cycle tah = address hold after noe or nwe deasserted = 1/2 memory cycle (1 cpu cycle) noe or nwe high time between burst beats = (rdn+1) memory cycle a6655-02 cpu clock memory clock a(25:0) ncs4 noe rd/nwr d(31:0) rdy nwe d3 d1 d0 d2 t as t ces t asrw0 rdf+1+waits rdn+1 t dswh t ceh max(2 * rrr,1) t ah t asrwn a0 a0+4 a0+8 a0+12 ncas[3:0] t dh
sa-1110 developer ? s manual 10-51 memory and pcmcia control module 10.5.7 flash memory interface overview the sa-1110 provides an sram-like interface for access of flash memory. the rdf fields in the mscx registers are the latency for each read access to nonburst flash or the first read access to burst flash; it also controls the nwe low time during a write cycle (nonburst) to burst flash. the rdn field controls subsequent read access times to burst flash and the nwe low time during a write cycle to nonburst flash. rrr is the time from ncs deassertion after a read to the start of a read from a different memory or after a write to another memory access. a single dram cbr refresh cycle may be inserted between words of a burst read from flash memory. during the refresh cycle, ncs and noe will be deasserted. there are some requirements for writes to flash memory. flash memory space must be uncacheable and unbuffered. writes must be exactly the width of the populated flash devices on the data bus (no byte writes to a 32-bit bus or word writes to a 16-bit bus, and so on). software is responsible for partitioning commands and data, and writing them out to flash in the appropriate sequence.a single cbr refresh cycle, for asynchronous dram and/or sdram, may be inserted between word accesses within a burst read. ncs and noe are deasserted during the refresh cycle. 10.5.8 flash memory timing diagrams and parameters nonburst flash reads have the same timing as nonburst roms as shown in the preceding figures. figure 10-18 shows the timing for writes to nonburst flash. writes to burst flash use nonburst accesses and equivalent timings, except that the nwe assertion time and data setup use rdf+1 instead of rdn+1. figure 10-18. flash write timing diagram (2 writes) note: if rt=00 then rdn+1. if rt=1x, then rdf+1 a6656-02 cpu clock memory clock a(25:0) ncs0 write command noe rd/nwr d(31:0) nwe data cmd write data possible read or write t as t asw t ces t dh rdn+1 rdn+1 max (2 * rrr,1) t ceh t ah a0 a1 t dswh
10-52 sa-1110 developer ? s manual memory and pcmcia control module in figure 10-18 some of the parameters are defined as follows: tas = address setup to ncs = 1 cpu cycle tces = ncs setup to nwe = 2 memory clock cycles (4 cpu cycles) tasw = address setup to nwe low (asserted) = 2-1/2 memory cycles (5 cpu cycles) tdswh = if rt=00, then: write data setup to nwe high (deasserted) = 1/2 memory cycle + (rdn+1) memory cycles. if rt=1x, then: write data setup to nwe high (deasserted) = 1/2 memory cycle + (rdf+1) memory cycles. tdh = data hold after nwe high = 1+1/2 memory cycle tceh = ncs held asserted after nwe deasserted = 1 memory clock cycle (2 cpu cycles) tah = address hold after nwe deasserted = 1+1/2 memory cycle (3 cpu cycles) 10.5.9 smrom overview the smrom interface uses thirteen of the dram interface ? s fifteen multiplexed row/column address signals (dra12-0), four static memory chip select signals (ncs 3:0), thirty-two data signals (d 31:0), a write enable signal (nwe) that should be connected to the smrom ? s mr input, an output enable signal (noe), a row address strobe (nsdras), a column address strobe (nsdcas), a memory clock (sdclk 0), and a memory clock enable (sdcke 0). 10.5.10 smrom commands the sa-1110 accesses smrom by using the following subset of standard interface commands:  power-down (pwrdn)  exit power-down (pwrdnx)  mode register set (mrs)  row activate (act)  read (read)  burst stop (stop)  no operation (nop) table 10-10 shows the smrom interface commands. table 10-10. smrom command encoding command sa-1110 pins sdcke (at clock n-1) sdcke (at clock n) ncs 3:0 nsdras nsdcas nwe noe dra12-0 pwrdn1011 1 14 ? b1111 x pwrdnx 0111 1 14 ? b1111 x mrs 1 x 0 0 0 0 1 mode (dra 12:7 = 6 ? b0 dra 6 = {rl}, dra 5:3 = {cl} dra 2:0 = 3 ? b010) act 1 x 0 0 1 1 1 row read1x01 0 10 column
sa-1110 developer ? s manual 10-53 memory and pcmcia control module 10.5.11 smrom state machine figure 10-19 illustrates all possible smrom controller states and transitions. many of the states are named after the smrom commands with which they are coincident: they have a fixed duration of one cycle. transitions from the other states are determined by the overall memory controller state and a few smrom/sdram power-down/self-refresh status/control bits. most of the states and transitions may involve multiple smrom devices. only those states shown below "idle" involve a single smrom row. if none of the labeled transitions have their conditions satisfied and no default transition is indicated, the current state is maintained for at least one more cycle. hardware or sleep reset causes the smrom state machine to enter the "idle" state. upon hardware or sleep reset, the sa-1110 is compatible with the following smrom default mode registers settings: ras latency of 2 cycles, cas latency of 5 cycles, burst length of 4, and sequential burst addressing. however, the mode registers must be written prior to attempting bursts (caches or read buffer enabled). writes to the smcnfg register instigate one or two mrs commands (to one or two bank pairs of smrom. these mrs commands always change the burst length to 8; ras latency and cas latency may change according to smcnfg bits. as required to ensure high impedance on smrom data outputs, the sa-1110 holds nwe, sdcke 0, and noe high during power-up. if the smrom_en pin is held high, mdcas00, smcnfg:cl0, and smcnfg:rl0 must maintain their hardware or sleep reset values to avoid mismatches in ras latency between the sa-1110 and boot smrom following a subsequent hardware or sleep reset. the following prioritization is used for transitions out of the idle state. some of these variables merely stall the smrom state machine while performing dram/sdram tasks. if enabled via the mdrefr:eapd and mdrefr:kapd bits, the "auto_power_down" transition occurs when none of the higher priority transitions are asserted. the "auto_power_up" transition occurs when "new_enable" or "new_access" is asserted during the "power-down" state. high priority - "enter_sleep" "new_enable" "new_access" low priority - "auto_power_down" when the internal system bus causes a new access, the state machine will execute an act command. then the sa-1110 executes one read command for each single or burst access. for burst-of-n transfers, (n-1) nop commands follow the read. finally, a stop command terminates all transfers smaller than burst-of-eight. figure 10-20 shows a timing diagram of an smrom transaction. stop1x00 1 01 x nop1x1x x xx x nop 1 x 0 1 1 1 1 x table 10-10. smrom command encoding command sa-1110 pins sdcke (at clock n-1) sdcke (at clock n) ncs 3:0 nsdras nsdcas nwe noe dra12-0
10-54 sa-1110 developer ? s manual memory and pcmcia control module figure 10-19. smrom state machine a6642-01 power-down pwrdnx pwrdn !burst_done burst burst_done && burst_of_8 burst_done && !burst_of_8 power-down and clock-stop enter_sleep || auto_power_down auto_power_up auto_power_up nop mrs enter_sleep || auto_power_down !enter_sleep && !new_enable && new_access !enter_sleep && new_enable idle !burst read stop reset (hardware or sleep) act
sa-1110 developer ? s manual 10-55 memory and pcmcia control module figure 10-20. smrom eight-beat and two-beat timing for 2 m x 16 bit organization (32 mbit) at half-memory clock frequency (mdrefr:k0db2=1) 10.6 pcmcia overview the sa-1110 pcmcia interface provides controls for one pcmcia card slot with a psktsel pin for support of a second slot. this 16-bit host interface supports 8- and 16-bit peripherals and handles common memory, i/o, and attribute memory accesses. the interface does not support the pcmcia dma protocol. the duration of each access is based on an internally generated clock that is programmed per address space by fields within the mecr register. figure 10-21 shows the memory map for the pcmcia space. a6644-02 memory clock sdclk sdcke command dra12-0 nsdras ncs nsdcas nwe noe rd/nwr act read act read stop d contents of smrom/dram register fields: rl=2 cycle smcnfg:clo=4 (cl=5 cycle) mdcas00=0101 0101 0101 0101 0101 0101 0111 1111(binary) smcnfg:ra0=4 mdcas01=0101 0101 0101 0101 0101 0101 0101 0101(binary) first last time 1234567891011121314151617181920212223 d0 d1 d2 d3 d4 d5 d6 d7 col row row col rl 2 cl
10-56 sa-1110 developer ? s manual memory and pcmcia control module figure 10-21. pcmcia memory map the pcmcia memory space is divided into eight partitions, four for each card slot. the four partitions for each card slot are common memory, i/o, attribute memory, and a reserved space. each partition starts on a 64 mbyte boundary. pins a 25:0, npreg, and psktsel are driven at the same time. npce1 and npce2 are driven at address time for memory and attribute accesses. for i/o accesses, their value depends on the value of niois16 and thus will be valid a finite time after niois16 is valid. common memory and attribute accesses assert the npoe or npwe control signals. i/o accesses assert the nior or niow control signals and use the niois16 input signal to determine the bus width of the transfer (8 or 16 bit). the sa-1110 uses npce2 to indicate to the expansion device that the upper half of the data bus, d 15:8, will be used for the transfer and npce1 to indicate that the lower half of the data bus, d 7:0, will be used. when npce2 is low, a 0 is ignored and an odd byte is transferred across d 15:8. if npce2 is high and npce1 is low, then a 0 is used to determine whether the byte being transferred across d 7:0 is the odd byte or even byte. transfers always start assuming a 16-bit bus. after the address is placed on the bus, an i/o device may respond with niois16 indicating that it can perform the transfer in a single 16-bit transfer. if niois16 is not asserted within the proper time, the address is assumed to be to two 8-bit registers and the transfer is completed as two 8-bit transfers on the low byte lane, d 7:0, with npce2 deasserted, npce1 asserted, a 0 =0 for the first 8-bit transfer, and a 0 =1 for the second 8-bit transfer. a6645-01 socket 1 memory space socket 1 attribute space socket 0 memory space socket 0 attribute space socket 1 i/o space socket 0 i/o space reserved reserved 0h3c00 0000 0h3800 0000 0h3400 0000 0h3000 0000 0h2c00 0000 0h2800 0000 0h2400 0000 0h2000 0000
sa-1110 developer ? s manual 10-57 memory and pcmcia control module 10.6.1 32-bit data bus operation the sa-1110 pcmcia interface supports the use of a 32-bit data bus. because the pcmcia is 8- or 16-bit only, the 32-bit operation is outside the scope of the pcmcia specification. this 32-bit mode is intended for use as a nonstandard expansion bus for communication with customer-designed logic. the operation is fairly simple; if a word read or write is performed to pcmcia memory space, then the entire 32-bit bus is read or written. normal pcmcia operations should be performed using byte or half-word accesses only. thirty-two bit accesses should be word aligned and only to "16-bit" space, as opposed to 8-bit space. memory and attribute space is 16 bits by definition. however, i/o space may be 8- or 16-bit depending upon the state of the niois16 input pin. thirty-two bit accesses to i/o space require that the target assert niois16. for 32-bit accesses, the only size information present on the bus is the assertion of the npce1 and npce2 pins. this is the same information that is present during half-word accesses. as such, there is no way by looking at the sa-1110 pins to determine whether the access is a half-word or word. this information can be derived only though a user-defined address decode outside the sa-1110. the following table shows the operation of the pcmcia interface and its relation to data width. access type data bus width 1 = 16 bit 0 = 8 bit address (1:0) resulting operation word 1 00 word read or write, npce1 and npce2 asserted (low). niois16 must be asserted for i/o space.. 1x undefined operation. x1 undefined operation. 0 xx undefined operation. half-word 1 x0 (even) single half-word access, npce1 and npce2 asserted (low). niois16 must be asserted for i/o space. x1 (odd) undefined operation. 0 x0 (even) two-byte accesses, both on the lower byte lane. even access first (npce1 asserted and npce2 deasserted for both). x1 (odd) undefined operation. byte 1 x0 (even) load or store byte on the lower byte lane (npce1 asserted, npce2 deasserted). x1 (odd) load or store byte on the upper byte lane (npce1 deasserted, npce2 asserted). 0 xx (even or odd) load or store byte on the low byte lane (npce2 deasserted and npce1 asserted).
10-58 sa-1110 developer ? s manual memory and pcmcia control module 10.6.2 external logic for pcmcia implementation the sa-1110 requires external logic to complete the pcmcia socket interface. figure 10-22 and figure 10-23 show general solutions for a one ? and two ? socket configuration. gpio or memory-mapped external registers are used to control the pcmcia interface ? s reset, power selection (vcc and vpp), and driver enable lines. each figure shows the logical connections necessary to support hot insertion capability. for dual ? voltage support, level shifting buffers are required for all sa-1110 input signals. hot insertion capability requires that each socket be electrically isolated from each other, and from the remainder of the memory system. note: if one or both of these features (hot insertion and dual ? voltage) is not required, then you can eliminate the logic related to the feature which is not required. the pull-ups shown are included for compliance with pc card standard - volume 2 - electrical specification . low-power systems should remove power from these pull-ups during sleep to avoid unnecessary power consumption. the cd 2:1 # signals have been ? or ? ed ? before being provided to the sa-1110. this signal is then routed into a gpio pin for interrupt capability. similarly, rdy/bsy# is routed to a gpio. the inpack# signal is not used. in the data bus transceiver control logic, npce1 should control the enable for the low byte lane and npce2 should control the enable for the high byte lane.
sa-1110 developer ? s manual 10-59 memory and pcmcia control module figure 10-22. pcmcia external logic for a two-socket configuration a6659-01 d(15:0) gpio(w) gpio(x) gpio(y) gpio(z) psktsel a(25:0) npreg npwait npiois16 npce(1:2) npoe, npwe npiow, npior intel ? strongarm ? * sa-1110 d(15:0) cd1# cd2# rdy/bsy# wait# wait# iois1616# a(25:0) reg# ce(1:2)# oe# we# ior# iow# socket 0 d(15:0) socket 1 dir npcex npcex npoe npior oe# dir oe# rdy/bsy# cd1# cd2# a(25:0) reg# ce(1:2)# oe# we# ior# iow# iois1616# wait# 6 6 6 wait# * strongarm is a registered trademark of arm limited.
10-60 sa-1110 developer ? s manual memory and pcmcia control module figure 10-23. pcmcia external logic for a one-socket configuration a6660-01 d(15:0) gpio(y) gpio(z) psktsel a(25:0) npreg npwait npiois16 npce(1:2) npoe, npwe npiow, npior intel ? strongarm ? * sa-1110 d(15:0) cd1# cd2# rdy/bsy# nc wait# iois1616# a(25:0) reg# ce(1:2)# oe# we# ior# iow# socket 0 npcex npoe npior dir oe# 6 6 * strongarm is a registered trademark of arm limited.
sa-1110 developer ? s manual 10-61 memory and pcmcia control module 10.6.3 pcmcia interface timing diagrams and parameters figure 10-24 shows a 16-bit access to a 16-bit memory or i/o device. the parameter, bs, is programmed in the mecr register. when common memory is accessed, the mecr:bsm0 or mecr:bsm1 field is used, depending on whether card socket 0 or 1 is addressed. mecr:bsio0,1 is used for i/o accesses and mecr:bsa0,1 is used for access to attribute memory. figure 10-24 and figure 10-25 show the appropriate setting of bs_xx = 0b00001. figure 10-24. pcmcia memory or i/o 16-bit access a6652-02 cpu clock memory clock bclk npwe,npiow, npoe or npior read data d (15:0) write data d (15:0) npce2, npce1 a,npreg, psktsel rd/nwr niois16 (for io only) npwait contents of pcmcia register fields: mecr:bs_xxn=1 mecr:fastn=0 3*(bs_xx+1)+1 3*(bs_xx+1) bs_xx+2 bs_xx+1 bs_xx+1
10-62 sa-1110 developer ? s manual memory and pcmcia control module figure 10-25. pcmcia i/o 16-bit access to 8-bit device a6653-02 cpu clock memory clock psktsel a(25:1), npreg bclk npce1 npior, npiow rd/nwr nois16 a(0) npec2 3 * (bs_xx+1)+1 3 * (bs_xx+1) bs_xx+3 low byte high byte bs_xx+1 2 * (bs_xx+1) low byte high byte * contents of pcmcia register fields: mecr:bs_xxn=1 mecr:fastn=0 read data (7:0) write data (7:0) npwait bs_xx+1
sa-1110 developer ? s manual 10-63 memory and pcmcia control module timing parameters are in memory clock cycle units. all are minimums except as noted: address access time: 6*(bs_xx+1) + 1 half-word or first byte fast=0 5*(bs_xx+1) second byte fast=0 4*(bs_xx+1) + 1 half-word or first byte fast=1 4*(bs_xx+1) second byte fast=1 command (npoe, npwe, npior, npiow) assertion time: 3*(bs_xx+1) address setup to command assert: 3*(bs_xx+1) + 1 half-word or first byte fast=0 2*(bs_xx+1) second byte fast=0 1*(bs_xx+1) + 1 half-word or first byte fast=1 1*(bs_xx+1) second byte fast=1 address hold after command deassertion: bs_xx+1 npwait valid after command assertion (max): 2*(bs_xx+1) - 2 chip enable (npce1,2) setup to npoe, npwe assert: 3*(bs_xx+1) + 1 fast=0 1*(bs_xx+1) + 1 fast=1 chip enable (npce1,2) setup to npior, npiow assert: 3*(bs_xx+1) + 1 - (niois16 delay from address) half-word or first byte fast=0 2*(bs_xx+1) - (niois16 delay from address) second byte fast=0 1*(bs_xx+1) + 1 - (niois16 delay from address) half-word or first byte fast=1 1*(bs_xx+1) - (niois16 delay from address) second byte fast=1 chip enabled hold from command deassert: bs_xx+1 see chapter 13, ? ac parameters ? for actual ac timing. 10.7 memory interface reset and initialization on hardware or sleep reset, the dynamic memory interface is disabled. the boot rom (connected to ncs0) is configured for smrom if smrom_en=1. otherwise, boot rom is configured for the slowest nonburst rom/flash. the rom_sel pin determines the bus size of asynchronous boot rom. immediately, boot rom is available for reading and all memory interface control registers are available for reading and writing. on hardware reset the memory pins and controller are in the following state: nras/nsdcs(3:0) = 0xf ncas/dqm(3:0) = 0xf ncs(5:0) = 0xf noe = 1 nwe = 1 rd/nwr = 0 npior = 1 npiow = 1 npoe = 1 npwe = 1 nsdras = 1 nsdcas = 1 sdcke 0 = smrom_en, sdcke 1 = 0 if smrom_en=1, sdclk 0 oscillating at one-half the memory clock frequency (one-fourth the cpu frequency)
10-64 sa-1110 developer ? s manual memory and pcmcia control module else sdclk 0 = 0 sdclk 2:1 = 0 all dram banks disabled (mdcnfg:de3-0 = 0). static interface set to smrom or slowest non-burst rom/flash timing. (msc0: 15:0 field is initialized as follows: rrr=0xf, rdn=0x1f, rdf=0x1f, rbw = not rom_sel, rt=0) on sleep reset, the memory pins and controller are in the same state as after hardware reset; except that the ncas/dqm and nras/nsdcs pins remain asserted to keep asynchronous dram in a self-refresh until the processor can be configured. nras/nsdcs and ncs 0 will be asserted simultaneously because that latter is needed to fetch instructions from the reset vector. if sdram were in self-refresh, they are kept there by having sdcke(1) = 0. nras/nsdcs(3:0) = 0 ncas/dqm(3:0) = 0 10.7.1 hardware or sleep reset procedures software is responsible for controlling the following procedures when coming out of hardware or sleep reset. the procedures are slightly different for hardware reset and sleep reset. 1. on hardware reset in systems with dram or sdram, complete a power-on wait period (typically 100-200sec). this allows the internal clocks (used to generate sdclk) to stabilize. 2. in systems containing smrom, write to smcnfg to configure the cas latencies (cl fields), row address bit counts (ra fields), and enables (sm bits). a careful software sequence, involving a subsequent write to smcnfg, is required to change ras latencies (rl fields): see section 10.3.1 . while any smrom banks are being configured, all sdram banks and sdram/smrom auto-power-down must be disabled. 3. on sleep reset in systems containing dram, see section 9.5 on how to release the ncas/dqm and nras/nsdcs pins so that the dram will exit self-refresh. 4. in systems containing sdram, transition the sdram controller through the following state sequence: "self-refresh and clock-stop" to "self-refresh" to "power-down" to "pwrdnx" to "idle". see figure 10-7 . the sdram clock run and enable bits (k1run, k2run, and e1pin) are described in section 10.2.2 . 5. appropriately configure, but don ? t enable, each dram bank pair for asynchronous dram or sdram. 6. on hardware reset in systems containing dram or sdram, trigger a number (typically eight) of refresh cycles by attempting nonburst read or write accesses to any disabled dram bank. each such access causes a simultaneous cbr for all four banks: each bank pair according to its dram or sdram configuration. for sdram, it does this by causing a pass through the "cbr" state and back to "idle". on the first pass, the "pall" state is incurred prior to the "cbr" state. see figure 10-7 . 7. in systems containing dram or sdram, enable banks by setting mdcnfg:de3-0. for each sdram bank pair that has one or both banks enabled, this will force a pass through the "mrs" state and back to "idle". the mrs commands will program sdram device(s) with the cas latencies indicated by mdcnfg:tdl0,2. the burst type and length will always be programmed to sequential and one (1), respectively. 8. in systems containing sdram or smrom, optionally enable auto-power-down by setting mdrefr:eapd and mdrefr:kapd.
sa-1110 developer ? s manual 10-65 memory and pcmcia control module 10.7.2 software or watchdog reset procedures software is responsible for controlling the following procedures when coming out of software or watchdog reset. they must be completed prior to any sdram accesses or writes to mdcnfg or mdrefr, to ensure that every sdram row is precharged prior to receiving the next bank activate (act) or mode register set (mrs) command. 1. disable all sdram banks by clearing mdcnfg:de3..0, without changing mdcnfg:dtim2,0. 2. trigger a precharge all (pall) command to sdram by attempting a nonburst read or write access to any disabled dram bank. 3. re-enable sdram banks by setting mdcnfg:de3..0. 10.8 alternate memory bus master mode the sa-1110 supports the existence of an alternate master on the dram memory bus. the alternate master is given control of the bus using a hardware handshake. this handshake is performed through mbreq and mbgnt, which are invoked through the alternate functions on gpio 22 and gpio 21 respectively. when the alternate master wants to take control of the memory bus, it asserts mbreq (gpio 22). the sa-1110 will complete any pending or in-progress memory operation and any outstanding dram refresh cycle. it then deasserts sdcke 1 and tristates all memory bus pins used with dram bank 0 (nras/nsdcs 0, a 25:0, noe, nwe, nsdras, nsdcas, sdclk 1, d 31:0, ncas/dqm 3:0). all other memory and pcmcia pins remain driven, including sdclk 2 is driven to 0 , sdclk 0 is driven to 0, and sdcke 0 is driven to 1. the rd/nwr pin will remain low. after that the sa-1110 will assert mbgnt (gpio 21), the alternate master should start driving all pins (including sdclk 1), and the sa-1110 will re-assert sdcke 1. the grant sequence and timing are as follows; the tmem unit of time is the memory clock period (twice the cpu clock period): ? alternate master asserts mbreq ? sa-1110 deasserts sdcke 1 at time (t) ? sa-1110 begins to tristate dram outputs at time (t + 1*tmem) ? sa-1110 asserts mbgnt at time (t + 2*tmem) ? alternate master begins to drive dram outputs prior to time (t + 3*tmem) ? sa-1110 asserts sdcke 1 at time (t + 4*tmem) during the tristate period, both mbreq and mbgnt remain high and an external device may take control of the tristated pins. the external device should drive all the tristated pins even if some are not actually used. otherwise, floating inputs may cause excessive crossover current and/or erroneous sdram commands. note that during the tristate period, the sa-1110 is unable to perform dram refresh cycles. the alternate master must assume the responsibility for dram integrity during this period. it is recommended that the system be designed such that the period of alternate mastership is limited to much less than the refresh period, or that the alternate master implement a refresh counter making it capable of performing refresh at the proper intervals. to give up the bus, the alternate master deasserts mbreq. the sa-1110 deasserts sdcke 1 and deasserts mbgnt, the alternate master stops driving all the dram pins (including sdclk 1), the sa-1110 resumes driving all dram pins (including sdclk 1), and the sa-1110 re-asserts sdcke 1. the release sequence and timing are as follows:
10-66 sa-1110 developer ? s manual memory and pcmcia control module ? alternate master deasserts mbreq ? sa-1110 deasserts sdcke 1 at time (t) ? sa-1110 deasserts mbgnt at time (t + 1*tmem) ? alternate master tristates dram outputs prior to time (t + 2*tmem) ? sa-1110 begins to drive dram outputs at time (t + 3*tmem) ? sa-1110 asserts sdcke 1 at time (t + 4*tmem) if the refresh counter inside the sa-1110 requested a refresh cycle during the alternate master tenure, then that refresh cycle is run first, followed by any other bus transactions that stalled during that period. this mode is set up by writing registers as follows:  write the gpio pin direction register (gpdr) at physical address 0x9004 0004 so as to set bit 21 (make gpio 21 an output) and clear bit 22 (make gpio 22 an input).  write the gpio alternate function register (gafr) at physical address 0x9004 001c so as to set bits 21 (enable the mbgnt alternate output function) and 22 (enable the mbreq alternate input function).  write the test unit control register (tucr) at physical address 0x9003 0008 so as to set bit 10 (enable the memory request mode).
sa-1110 developer ? s manual 11-1 peripheral control module 11 this chapter describes the peripheral control units that are integrated within the intel ? strongarm ? sa-1110 microprocessor (sa-1110) and the dma controller that services them. the peripheral units include one parallel data port to drive an lcd display, one synchronous serial port, and four asynchronous serial ports that implement different serial protocol standards. each section includes a description of the unit ? s operation and the control, data, and status registers used to configure the unit. the dma controller acts as the gateway to the peripheral units. it provides dma access to these units and control and address decode for programmed i/o accesses between the processor and registers inside the units. note that the lcd controller contains its own high bandwidth dma controller that is connected to the arm * system bus and is used to read pixel and palette information from the off-chip frame buffer. 11.1 read/write interface the arm system bus, shown in figure 11-1 , is a high-performance synchronous bus that connects the peripheral control module to the sa-1110 cpu and to the external memory controller. the dma connects the arm system bus to the arm peripheral bus. the arm peripheral bus implements a standard asynchronous protocol that is used by all peripherals designed for arm chips. this standard allows a single library of peripherals to be developed for the entire arm family of cpus, providing a means to quickly spin off new chip implementations that contain different peripheral mixes for target applications. note that the lcd controller interfaces to the arm system bus because its throughput requirement is much higher than that of any other serial peripheral. placing the lcd on the arm system bus allows faster synchronous transfers to be made between the external frame buffer and the lcd controller. additionally, the lcd controller contains its own dual-channel dma controller to supply frame buffer data to the unit. although the arm peripheral bus supports 32 bits of data, the register size (width) implemented for each peripheral is equal to the maximum data size that must be coherently read or written by the cpu and dma. this minimizes the size of the peripheral while providing the necessary memory throughput for the unit. although the peripherals ? register sizes vary, the arm peripheral bus does not support byte or half-word accesses. only word accesses are allowed. table 11-1 shows the register width, dma port size, and dma burst size of each of the six peripherals (and the ppc) implemented on the sa-1110.
11-2 sa-1110 developer ? s manual peripheral control module figure 11-1. peripheral control module block diagram 11.2 memory organization several of the serial ports contain more than one serial engine. each individual engine is self-contained (no shared logic or registers) and implements a separate serial protocol. serial ports 1, 2, and 4 each contain two separate serial engines, totalling eight separate serial engines within all five serial ports. each of the eight serial engines, including the peripheral pin controller (ppc), has been allocated a separate 64 kbyte block on-chip memory space in which its registers reside. although the register width of individual units varies, each register is right justified on word boundaries. all register accesses via the cpu must be performed using word reads and writes. this chapter includes a summary of individual peripheral registers. see appendix a, ? register summary, ? for a complete summary of all on-chip registers. table 11-1. peripheral control modules ? register width and dma port size peripheral register width / dma port size dma burst size lcd controller 32 4 words serial port 0: udc 8 8 bytes serial port 1: uart 8 4 bytes serial port 2: icp uart 8 4 bytes hssp 8 8 bytes serial port 3: uart 8 4 bytes serial port 4: mcp 16 8 bytes ssp 16 8 bytes peripheral pin controller (ppc) 32 n/a a6833-01 arm ? * system bus arm peripheral bus l_pclk lcd controller l_bias udc+ serial port 0 udc udc- txd1 serial port 1 gpclk/uart rxd1 txd2 serial port 2 icp rxd2 txd3 serial port 3 uart rxd3 txd4 serial port 4 mcp/ssp sclk dma controller * arm is a registered trademark of arm limited.
sa-1110 developer ? s manual 11-3 peripheral control module table 11-2 shows the base address for each of the peripheral control units. 1 the ppc does not support dma requests. 11.3 interrupts each peripheral unit interfaces to the interrupt controller within the system control module. the interrupt controller contains a 32-bit interrupt pending register, which when read, informs the user of all the units on the sa-1110 that are currently generating an unmasked interrupt. once the user determines which unit is causing the interrupt, the unit ? s status registers can be read to determine the exact cause of the interrupt. this mechanism provides a two-level approach to identify the source of any interrupt from the hundreds of possible interrupt sources that exist on the sa-1110. each of the peripheral units generate either one or two interrupts that correspond to specific interrupt pending bits within the interrupt controller. serial port 1 contains one serial engine and one logic engine. serial port 4 contains two independent serial engines. although each peripheral uses only one set of pins for serial communication, the user may choose to use both logic blocks within serial ports 1 and 4 by assigning one of the two protocols to communicate off-chip by taking control of gpio pins. because the two logic blocks within serial ports 1 and 4 can operate at the same time, these two units are assigned two separate interrupt request numbers within the interrupt controller's pending register, except for serial port 1's gpclk unit which does not generate an interrupt request. units. table 11-3 shows the interrupt level for each of the peripheral control units. table 11-2. peripheral unit base addresses peripheral serial protocol base address lcd controller 0h b010 0000 serial port 0 usb 0h 8000 0000 serial port 1 uart 0h 8001 0000 gpclk 0h 8002 0000 serial port 2 (icp) uart 0h 8003 0000 hssp 0h 8004 0000 serial port 3 uart 0h 8005 0000 serial port 4 mpc 0h 8006 0000 ssp 0h 8007 0000 peripheral pin controller (ppc) 1 0h 9006 0000 table 11-3. peripheral unit interrupt numbers peripheral interrupt number lcd controller 12 serial port 0: usb 13 serial port 1: uart 15 serial port 2: icp 16 serial port 3: uart 17 serial port 4: mcp 18 ssp 19
11-4 sa-1110 developer ? s manual peripheral control module 11.4 peripheral pins each peripheral has a number of dedicated pins with which to communicate to off-chip devices. the six peripherals of the sa-1110 use a total of 24 pins: the lcd uses twelve pins; serial port 4 four pins; and serial port 0 through 3 each use two pins. many applications may not require the use of all six of the sa-1110 ? s peripherals. to provide maximum flexibility, the pins associated with any unused peripheral (except serial port 0) can be used as general-purpose digital input/output pins that are noninterruptible. when a peripheral is disabled, the peripheral pin controller (ppc) automatically takes control of the peripheral ? s pin direction and pin state. a user can sample input pin state by reading the ppc pin state register (ppsr) and control the state of an output pin by writing to it. pin direction is established by configuring the ppc pin direction register (ppdr). table 11-4 shows a list of the pins associated with the peripheral units. . table 11-4. dedicated peripheral pins peripheral gpio pin function lcd controller l_pclk pixel clock l_lclk line clock/horizontal sync pulse l_fclk frame clock/vertical sync pulse l_bias a/c bias signal ldd<7:0> pixel data serial port 0: usb udc+ positive differential receiver udc- negative differential receiver serial port 1: uart txd_1 serial transmit data rxd_1 serial receive data serial port 2: icp txd_2 serial transmit data rxd_2 serial receive data serial port 3: uart txd_3 serial transmit data rxd_3 serial receive data serial port 4: mpc/ssp txd_c serial transmit data rxd_c serial receive data sclk_c serial clock sfrm_c serial frame clock
sa-1110 developer ? s manual 11-5 peripheral control module 11.5 use of the gpio pins for alternate functions each of the sa-1110 ? s six peripheral units has a number of dedicated pins that can be used to drive an lcd display, communicate serially with off-chip devices, or be used as general-purpose digital input/output pins. each of the peripherals, except serial port 0 and 2, also has programming options that allow the unit to take over control of one or more gpio pins from the system control module to be used for various special functions. several control bits must be programmed to enable gpio use by peripheral units. first, the user must enable the special function either within the peripheral unit or within the peripheral pin controller (ppc). second, the user must enable the gpio pin to communicate to the peripheral and select the pin ? s direction by programming the gpio alternate function register (gafr) and gpio pin direction register (gpdr), respectively. see section 9.1, ? general-purpose i/o ? on page 9-1 for a description of these gpio registers. table 11-5 shows the gpio pins that can be used for alternate peripheral pin functions. table 11-5. peripheral unit gpio pin assignment peripheral gpio pin function lcd controller gpio 2 ldd 8 pin for dual-panel color mode. gpio 3 ldd 9 pin for dual-panel color mode. gpio 4 ldd 10 pin for dual-panel color mode. gpio 5 ldd 11 pin for dual-panel color mode. gpio 6 ldd 12 pin for dual-panel color mode. gpio 7 ldd 13 pin for dual-panel color mode. gpio 8 ldd 14 pin for dual-panel color mode. gpio 9 ldd 15 pin for dual-panel color mode. serial port 0: usb n/a none. serial port 1: uart gpio 14 transmit pin for uart when gpclk and uart are both needed. gpio 15 receive pin for uart when gpclk and uart are both needed. gpio 16 clock output for gpclk. gpio 17 reserved gpio 18 sample clock input to uart. serial port 2: icp n/a none. serial port 3: uart gpio 20 sample clock input to uart. serial port 4: mpc/ssp gpio 10 transmit pin for ssp when mcp and ssp both needed. gpio 11 receive pin for ssp when mcp and ssp both needed. gpio 12 serial clock pin for ssp when mcp and ssp both needed. gpio 13 serial frame clock pin for ssp when mcp and ssp both needed. gpio 19 clock input pin for ssp to drive the frame and sample rates when other than nonmultiple of 3.6864 mhz needed. gpio 21 clock input pin for mcp to drive the frame and sample rates when other than 12 mbps needed.
11-6 sa-1110 developer ? s manual peripheral control module 11.6 dma controller the dma controller consists of six independent dma channels. each channel can be configured to service any of the serial controllers. two channels are required to service a full-duplex serial controller. the dma controller is intended to relieve the processor of the interrupt overhead in servicing these ports with programmed i/o. if desired, any or all peripherals (except the udc) may be serviced with programmed i/o instead of dma. each peripheral is capable of requesting processor service through its own interrupt lines or through a dma request. the dma controller consists of a set of configuration and control registers for each channel and a common data transfer engine that services the active channel. channels are serviced in a fixed priority sequence if the dma receives multiple requests. each channel is serviced in increments of that device ? s burst size and delivered in the granularity of that device ? s port width (byte or half-word). the burst size and port width for each device is programmed in the channel registers and is based on the device ? s fifo depth and bandwidth needs. when multiple channels are actively executing, each channel is serviced with a burst of data after which the dma controller may perform a context switch to another active channel. the dma controller performs context switches based on whether a channel is active, whether its target device is currently requesting service (the fifo is half-empty), and where that channel lies in the priority scheme. data transfers are performed between a device (one of the serial controllers) and memory (rom, ram, flash, sram, or dram). dma transfers to and from pcmcia space are not permitted. during a write, a burst of data is read from memory as words into a buffer inside the dma controller. that data is then written to the device according to the device ? s port width and the state of the endian bit (e). during a read, data is read from the device according to the device ? s port width and then sent to memory as words. the organization of the bytes inside that word is determined again by the endian bit (e). the control registers for each channel include two starting address registers and two transfer count registers. these registers should be programmed by the system at the start of the transfer. the registers control two rotating buffers for use during a transfer. these buffers, designated buffer a and buffer b, can be chained together so that when a transfer to (or from) one buffer completes, the transfer to (or from) the other begins immediately. by interrogating the status information in the channel control/status register, the user can safely update the address pointer and transfer count of the inactive buffer. 11.6.1 dma register definitions each dma channel is supported by six 32-bit registers as part of the dma controller hardware. these registers are the dma device address register (ddarn), dma control/status register (dcsrn), dma buffer a start address (dbsan), dma buffer b start address (dbsbn), dma buffer a transfer count (dbtan), and dma buffer b transfer count (dbtbn). (the n is a value from 0 to 5 and is the channel number.) a register summary including physical addresses is provided at the end of this section. note: a question mark (?) signifies that the reset value of that bit is undefined when the processor has completed its reset cycle.
sa-1110 developer ? s manual 11-7 peripheral control module 11.6.1.1 dma device address register (ddarn) the ddarn is a 32-bit read/write register containing channel information regarding the target device. writes to this register are blocked if the run bit in the dcsrn is one. the following figure shows the format for this register; question marks indicate that the values are unknown at reset. 1 ? partial ? means that certain bits in the address are assumed to be zero. the da 31:8 field is constructed as follows: da 31:28 = device port address 31:28. device port address 27:22 is assumed to be zero. da 27:8 = device port address 21:2. device port address 1:0 is assumed to be zero. ddarn read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 da 31 da 30 da 29 da 28 da 27 da 26 da 25 da 24 da 23 da 22 da 21 da 20 da 19 da 18 da 17 da 16 da 15 da 14 da 13 da 12 da 11 da 10 da 9 da 8 ds 3 ds 2 ds 1 ds 0 dw bs e rw reset 0 0 0 0 0 0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? bits name description 0rw device data transfer direction (read/write). 0 = transfer is a write (memory to device). 1 = transfer is a read (device to memory). 1e device endianess. 0 = byte ordering is little endian. 1 = byte ordering is big endian. 2bs device burst size. 0 = four datums per burst. 1 = eight datums per burst. 3dw device datum width. 0 = datum size is one byte. 1 = datum size is one half-word. 7..4 ds 3..0 device select. this field is programmed to point to the desired device. 31..8 da 31..8 device address field. this field is a partial address of the data port of the device currently being serviced. 1
11-8 sa-1110 developer ? s manual peripheral control module the value written to the device select ds 3:0 field specifies which dma request this channel responds to. the device datum width (dw) field value is fixed for each device type and indicates whether the device ? s data port is one or two bytes wide. if the datum width is programmed incorrectly for a particular device select, then the results are unpredictable. the device burst size (bs) field value is fixed for each device type. it indicates how many beats of the datum width are transferred each time the device requests service. this value is chosen based on the fifo size of the particular device. if the burst size is programmed incorrectly for a particular device select, then the results are unpredictable. note: the big endian implementation scheme is not supported in the b4 stepping and above. the device endianess e field value indicates the byte ordering within a word when data is read from or written to memory. if the e bit is zero, then memory is assumed to be little endian. if the bit is one, then memory is assumed to be big endian. the following figure shows big and little endian dma transfers. figure 11-2. big and little endian dma transfers the device transfer direction (rw) field indicates the direction of the transfer. a zero indicates that the transfer is a write (with respect to the device) and that the flow of data will be from memory to the device. if the rw field is programmed to a one, then the transfer is a read and the flow of data will be from the device to memory. the transfer direction is fixed for each device type. if the burst size is programmed incorrectly for a particular device select, then the results are unpredictable. a6893-01 d<31> half-word wide device byte-wide device d<0> dma controller big endian dma transfers 3210 32 10 10 3 0 1 2 3 3 2 1 0 to from from to 2 from memory d<31> half-word wide device byte-wide device d<0> dma controller little endian dma transfers 3210 32 10 32 1 3 2 1 0 0 1 2 3 to from from to 0 from memory
sa-1110 developer ? s manual 11-9 peripheral control module table 11-6. valid settings for the ddarn register unit name function device address ddar fields da 31:8 ds 3:0 dw bs e rw serial port 0 udc transmit 0x 8000 0028 0x80000a 0000 0 1 0/1 0 udc receive 0x 8000 0028 0x80000a 0001 0 1 0/1 1 serial port 1 uart transmit 0x 8001 0014 0x804005 0100 0 0 0/1 0 uart receive 0x 8001 0014 0x804005 0101 0 0 0/1 1 serial port 2 hssp transmit 0x 8004 006c 0x81001b 0110 0 1 0/1 0 hssp receive 0x 8004 006c 0x81001b 0111 0 1 0/1 1 uart transmit 0x 8003 0014 0x80c005 0110 0 0 0/1 0 uart receive 0x 8003 0014 0x80c005 0111 0 0 0/1 1 serial port 3 uart transmit 0x 8005 0014 0x814005 1000 0 0 0/1 0 uart receive 0x 8005 0014 0x814005 1001 0 0 0/1 1 serial port 4 mcp transmit (audio) 0x 8006 0008 0x818002 1010 1 1 0/1 0 mcp receive (audio) 0x 8006 0008 0x818002 1010 1 1 0/1 1 mcp transmit (telecom) 0x 8006 000c 0x818003 1100 1 1 0/1 0 mcp receive (telecom) 0x 8006 000c 0x818003 1101 1 1 0/1 1 ssp transmit 0x 8007 006c 0x81c01b 1110 1 1 0/1 0 ssp receive 0x 8007 006c 0x81c01b 1111 1 1 0/1 1
11-10 sa-1110 developer ? s manual peripheral control module 11.6.1.2 dma control/status register (dcsrn) the dcsrn is a 32-bit read/write register that contains control and status bits for the channel. the following figure shows the format for this register; question marks indicate that the values are unknown at reset. dcsrn read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved biu strtb doneb strta donea error ie rune reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ?0 0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? bits name description 0run run bit. this is a control bit and is set by the user to indicate that the device address register has been loaded. no transfer will occur on this channel unless this bit is set. clearing the run bit on an active channel acts as a pause to that channel. operation can then be resumed by again setting the run bit. 1ie interrupt enable. this bit enables interrupts to be passed onto the interrupt controller. an interrupt is the ? or ? of the donea, doneb, and error bits. 2 error transfer error bit. error is a status bit and is set to indicate that a memory error has occurred. it can generate an interrupt if the ie bit is set. error is cleared by software through setting the run bit. 3donea buffer a done. this bit is a status bit and indicates that the transfer into or out of buffer a has completed. it is cleared by writing a one to it or by setting the strta bit. donea can generate an interrupt if ie is set. 4strta buffer a transfer start. this bit is a control bit and is written by the user. it causes the buffer a transfer to begin. this bit is functional only if the run bit is set. 5doneb this bit is a status bit and indicates that the transfer into or out of buffer b has completed. it is cleared by writing a one to it or by setting the strtb bit. doneb can generate an interrupt if ie is set. 6 strtb buffer b transfer start. this bit is a control bit and is written by the processor. it causes the buffer b transfer to begin. this bit is functional only if the run bit is set. 7biu buffer in use. biu is a status bit and may be read to indicate which buffer (a or b) is active . this bit is toggled by the dma controller when donea or doneb are set. this bit is cleared by all reset sources (hard, sleep, watchdog, or software). 31..8 ? reserved. these bits are reserved and read as zeros. writes to this field have no effect.
sa-1110 developer ? s manual 11-11 peripheral control module the run bit is the channel enable. it should be written to a one when the channel is ready for a transfer. it can also be used to pause the channel in the middle of a transfer; when it is set to a one again, the channel will resume from the current pointer value using the current active buffer. if the run bit is cleared in the middle of a burst, the burst will complete before the channel is paused. the ddar may be written only when run is zero. the ie bit is the interrupt enable for the channel. an interrupt is generated if the donea, doneb, or error bits are set and the ie bit is set. the interrupt is negated when all of these status bits are cleared. the error bit is set if the dma controller is incorrectly programmed and points to reserved memory space. no error is generated for references to nonexistent external memory. if enabled, error generates a channel interrupt. the donea bit is a status bit set by the dma controller to indicate that the transfer to or from buffer a has completed. if enabled, donea causes a channel interrupt. the strta bit is written by the user to start the channel transfer to or from buffer a. when donea is set, strta is cleared. the immediate action resulting from setting strta is dependent on the state of the biu bit. the doneb bit is a status bit set by the dma controller to indicate that the transfer to or from buffer b has completed. if enabled, doneb will cause a channel interrupt. the strtb bit is written by the user to start the channel transfer to or from buffer b. when doneb is set, strtb is cleared. the immediate action resulting from setting strtb is dependent on the state of the biu bit. the biu bit indicates the current buffer-in-use (a or b). if biu is a zero, buffer a is in use. if biu is a one, buffer b is in use.the setting of donea or doneb toggles the biu bit. this bit is never cleared except on reset (either hardware, software, or sleep). for this reason, the processor must interrogate this bit before programming the channel for a new transfer. if both strta and strtb are set at the same time, the first buffer serviced depends on the state of biu. 11.6.1.3 dma buffer a start address register (dbsan) the dbsan is a 32-bit read/write register that contains the starting memory address for buffer a. this register may be written only when strta is zero.
11-12 sa-1110 developer ? s manual peripheral control module 11.6.1.4 dma buffer a transfer count register (dbtan) the dbtan is a 32-bit read/write register that contains the current transfer count in bytes for buffer a. this register may be written only when the strta bit for this channel is a zero. the following figure shows the format of this register; question marks indicate that the values are unknown at reset. 11.6.1.5 dma buffer b start address register (dbsbn) the dbsbn is a 32-bit read/write register that contains the starting memory address for buffer b. this register may be written only while strtb in the dcsr is zero. 11.6.1.6 dma buffer b transfer count register (dbtbn) the dbtbn is a 32-bit read/write register that contains the current transfer count in bytes for buffer b. this register may be written only when the strtb bit for this channel is a zero. the following figure shows the format of this register; question marks indicate that the values are unknown at reset. dbtan read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved tca 12 tca 11 tca 10 tca 9 tca 8 tca 7 tca 6 tca 5 tca 4 tca 3 tca 2 tca 1 tca 0 reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ?0 0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? bits name description 12..0 tca 12..0 transfer count (buffer a). this field is a 13-bit value and contains the current transfer count (in bytes) for the transfer to or from buffer a. the maximum value programmed via this transfer count is 8 kbyte. 31..13 ? reserved. these bits are reserved and read as zeros. writes to this field have no effect. dbtbn read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved tcb 12 tcb 11 tcb 10 tcb 9 tcb 8 tcb 7 tcb 6 tcb 5 tcb 4 tcb 3 tcb 2 tcb 1 tcb 0 reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ?0 0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? bits name description 12..0 tcb 12..0 transfer count (buffer b). this field is a 13-bit value and contains the current transfer count (in bytes) for the transfer to or from buffer b. the maximum value programmed via this transfer count is 8 kbyte. 31..13 ? reserved. these bits are reserved and read as zeros. writes to this field have no effect.
sa-1110 developer ? s manual 11-13 peripheral control module 11.6.2 dma operation the dma controller provides dynamic context switching between active channels on a demand basis. a context switch may occur when a channel completes a command or when a particular burst (portion of a transfer) has been completed. for example, if the fifo in a particular transmit serial controller is full and cannot accept more data, that channel may be switched out of the active context in favor of another channel that is requesting service. an active channel may actually go idle many times as the device is serviced. channels are serviced in a fixed priority with channel 0 being the highest and channel 5 being the lowest. 11.6.3 dma register list the following table lists the registers contained within the dma controller: physical address register name symbol channel 0 registers 0h b000 0000 dma device address register. ddar0 0h b000 0004 dma control/status register 0. write ones to set. dcsr0 0h b000 0008 write ones to clear. 0h b000 000c read only. 0h b000 0010 dma buffer a start address 0. dbsa0 0h b000 0014 dma buffer a transfer count 0. dbta0 0h b000 0018 dma buffer b start address 0. dbsb0 0h b000 001c dma buffer b transfer count 0. dbtb0 channel 1 registers 0h b000 0020 dma device address register 1. ddar1 0h b000 0024 dma control/status register 1. write ones to set. dcsr1 0h b000 0028 write ones to clear. 0h b000 002c read only. 0h b000 0030 dma buffer a start address 1. dbsa1 0h b000 0034 dma buffer a transfer count 1. dbta1 0h b000 0038 dma buffer b start address 1. dbsb1 0h b000 003c dma buffer b transfer count 1. dbtb1 channel 2 registers 0h b000 0040 dma device address register 2 ddar2 0h b000 0044 dma control/status register 2. write ones to set. dcsr2 0h b000 0048 write ones to clear. 0h b000 004c read only. 0h b000 0050 dma buffer a start address 2. dbsa2 0h b000 0054 dma buffer a transfer count 2. dbta2 0h b000 0058 dma buffer b start address 2. dbsb2 0h b000 005c dma buffer b transfer count 2. dbtb2
11-14 sa-1110 developer ? s manual peripheral control module channel 3 registers 0h b000 0060 dma device address register 3. ddar3 0h b000 0064 dma control/status register 3. write ones to set. dcsr3 0h b000 0068 write ones to clear. 0h b000 006c read only. 0h b000 0070 dma buffer a start address 3. dbsa3 0h b000 0074 dma buffer a transfer count 3. dbta3 0h b000 0078 dma buffer b start address 3. dbsb3 0h b000 007c dma buffer b transfer count 3. dbtb3 channel 4 registers 0h b000 0080 dma device address register 4. ddar4 0h b000 0084 dma control/status register 4. write ones to set. dcsr4 0h b000 0088 write ones to clear. 0h b000 008c read only. 0h b000 0090 dma buffer a start address 4. dbsa4 0h b000 0094 dma buffer a transfer count 4. dbta4 0h b000 0098 dma buffer b start address 4. dbsb4 0h b000 009c dma buffer b transfer count 4. dbtb4 channel 5 registers 0h b000 00a0 dma device address register 5. ddar5 0h b000 00a4 dma control/status register 5. write ones to set. dcsr5 0h b000 00a8 write ones to clear. 0h b000 00ac read only. 0h b000 00b0 dma buffer a start address 5. dbsa5 0h b000 00b4 dma buffer a transfer count 5. dbta5 0h b000 00b8 dma buffer b start address 5. dbsb5 0h b000 00bc dma buffer b transfer count 5. dbtb5 physical address register name symbol
sa-1110 developer ? s manual 11-15 peripheral control module 11.7 lcd controller the sa-1110 ? s lcd controller has three types of displays: passive color mode ...............supports a total of 3375 possible colors, displaying any of 256 colors for each frame. active color mode .................supports up to 65536 colors (16-bit). passive monochrome mode ..supports 15 gray-scale levels. display sizes up to 1024 x 1024 pixels are supported. however, the size of encoded pixel data within the frame buffer limits the maximum size screen the lcd can drive due to memory bus bandwidth. the lcd controller also supports single- or dual-panel displays. encoded pixel data is stored in external memory in a frame buffer in 4-, 8-, 12-, or 16-bit increments and is loaded into a 5-entry fifo (32 bits per entry) on a demand basis using the lcd ? s own dedicated dual-channel dma controller. one channel is used for single-panel displays and two are used for dual-panel displays. frame buffer data contains encoded pixel values that are used by the lcd controller as pointers to index into a 256-entry x 12-bit wide palette. monochrome palette entries are 4 bits wide; color palette entries are 12 bits wide. encoded pixel data from the frame buffer, which is 4 bits wide, addresses the top 16 locations of the palette; 8-bit pixel data accesses any of the 256 entries within the palette. when passive color 12-bit pixel mode is enabled, the color pixel values bypass the palette and are fed directly to the lcd ? s dither logic. when active color 16-bit pixel mode is enabled, the pixel value not only bypasses the palette, but also bypasses the dither logic and is sent directly to the lcd ? s data pins. once the 4- or 8-bit encoded pixel value is used to select a palette entry, the value programmed within the entry is transferred to the dither logic, which uses a patented space- and time-based dithering algorithm to produce the pixel data that is output to the screen. dithering causes individual pixels to be turned off on each frame at varying rates to produce the 15 levels of gray for monochrome screens and 15 levels each for the red, green, and blue pixel components for color screens, providing a total of 3375 colors (256 colors are available on each frame). the data output from the dither logic is placed in a 19-entry pin data fifo before it is placed out on the lcd ? s pins and driven to the display using pixel clock. depending on the type of panel used, the lcd controller is programmed to use either 4-, 8-, or 16-pixel data output pins. single-panel monochrome displays use either four or eight data pins to output 4 or 8 pixels for each pixel clock; single-panel color displays use eight pins to output 2-2/3 pixels each pixel clock (8 pins / 3 colors/pixel = 2-2/3 pixels per clock). the lcd controller also supports dual-panel mode, which causes the lcd controller ? s data lines to be split into two groups, one to drive the top half and one to drive the bottom half of the screen. for dual-panel displays, the number of pixel data output pins is doubled, allowing twice as many pixels to be output each pixel clock to the two halves of the screen. in active color display mode, the lcd controller can drive tft displays. the lcd ? s line clock pin functions as a horizontal sync (hsync) signal, the frame clock pin functions as a vertical sync (vsync) signal, and the ac bias pin functions as an output enable (oe) signal. in tft mode, the lcd ? s dither logic is bypassed, sending selected palette entries (12 bits each) directly to the lcd ? s data output pins. additionally, 16-bit pixels can be used that bypass both the palette and the dither logic. the lcd controller can be configured in active color display mode and used with an external dac (and optionally an external palette) to drive a video monitor. note that only monitors that implement the rgb data format can be used; the lcd controller does not support the ntsc standard.
11-16 sa-1110 developer ? s manual peripheral control module when the lcd controller is disabled, control of its pins is given to the peripheral pin controller (ppc) to be used as general-purpose digital input/output pins that are noninterruptible. the lcd controller ? s pins include:  ldd 7:0 data lines used to transmit either four or eight data values at a time to the lcd display. for monochrome displays, each pin value represents a pixel; for passive color, groupings of three pin values represent one pixel (red, green, and blue data values). in single-panel monochrome mode, ldd 3:0 pins are used. for double-pixel data, single-panel monochrome, dual-panel monochrome, single-panel color, and active color modes ldd 7:0 are used.  gpio 9:2 when dual-panel color or 16-bit tft operation is programmed, gpio pins are used as the additional, required lcd data lines to output pixel data to the screen.  l_pclk pixel clock used by the lcd display to clock the pixel data into the line shift register. in passive mode, pixel clock transitions only when valid data is available on the data pins. in active mode, pixel clock transitions continuously and the ac bias pin is used as an output to signal when data is available on the lcd ? s data pins.  l_lclk line clock used by the lcd display to signal the end of a line of pixels that transfers the line data from the shift register to the screen and increment the line pointers. also, it is used by tft displays as the horizontal synchronization signal.  l_fclk frame clock used by the lcd displays to signal the start of a new frame of pixels that resets the line pointers to the top of the screen. also, it is used by tft displays as the vertical synchronization signal.  l_bias ac bias used to signal the lcd display to switch the polarity of the power supplies to the row and column axis of the screen to counteract dc offset. in tft mode, it is used as the output enable to signal when data should be latched from the data pins using the pixel clock. the pixel clock frequency is derived from the output of the on-chip pll that is used to clock the cpu (cclk) and is programmable from cclk/6 to cclk/514. each time new data is supplied to the lcd data pins, the pixel clock is toggled to latch the data into the lcd display ? s serial shifter. the line clock toggles after all pixels in a line have been transmitted to the lcd driver and a programmable number of pixel clock wait states have elapsed both at the beginning and end of each line. in passive mode, the frame clock is asserted during the first line of the screen. in active mode, the frame clock is asserted at the beginning of each frame after a programmable number of line clock wait states occur. in passive display mode, the pixel clock does not transition when the line clock is asserted. however, in active display mode, the pixel clock transitions continuously and the ac bias bin is used as an output enable to signal when valid pixels are present on the lcd ? s data lines. in passive mode, the ac bias pin can be configured to transition each time a programmable number of line clocks have elapsed to signal the display to reverse the polarity of its voltage to counteract dc offset in the screen.
sa-1110 developer ? s manual 11-17 peripheral control module 11.7.1 lcd controller operation the lcd controller supports a variety of user-programmable options including display type and size, frame buffer, encoded pixel size, and output data width. although all programmable combinations are possible, the selection of displays available within the market dictate which combinations of these programmable options are practical. the type of external memory system implemented by the user limits the bandwidth of the lcd ? s dma controller, which, in turn, limits the size and type of screen that can be controlled. the user must also determine the maximum bandwidth of the sa-1110 ? s external bus that the lcd is allowed to use without negatively affecting all other functions that the sa-1110 must perform. note that the lcd ? s dma engine has the highest priority on the sa-1110 ? s internal data bus structure (arm system bus) and can ? starve ? other masters on the bus, including the cpu. the following sections describe individual functional blocks within the lcd controller, frame buffer and palette memory organization, and the lcd ? s dma controller. the sections are arranged in order of data flow, starting with the off-chip frame buffer and ending with the pins that interface to the lcd display. 11.7.1.1 dma to memory interface palette ram and encoded pixel data are stored in off-chip memory (usually dram) in the frame buffer and are transferred to the lcd controller ? s 5-entry x 32-bit wide input fifo, on a demand basis, using the lcd controller ? s dedicated dma controller. the lcd controller is on the arm system bus (asb) rather than the arm peripheral bus (apb), where all other peripherals are located, because it is a higher speed synchronous bus that is able to maintain the data rate required for demanding displays, such as dual-panel color. the lcd ? s dma contains two channels that transfer data from external memory to the input fifo. one channel is used for single-panel displays and two are used for dual-panel displays. the lcd controller issues a service request to the dma after it has been initialized and enabled. the dma automatically performs four word transfers, filling all but one entry of the fifo. values are fetched from the bottom of the fifo, one entry at a time, and each 32-bit value is unpacked into individual pixel encodings, of 4, 8, 12, or 16 bits each. after the value is removed from the bottom of the fifo, the entry is invalidated and all data in the fifo is transferred down one entry. when four of the five entries are empty, a service request is issued to the dma. if the dma is not able to keep the fifo filled with enough pixel data due to insufficient external memory access speed and the fifo is emptied, the fifo underrun status bit is set and an interrupt request is made. 11.7.1.2 frame buffer the frame buffer is in an off-chip memory area used to supply enough encoded pixel values to fill the entire screen one or more times. at the start or lowest order address of the lcd controller ? s frame buffer is either a 32- or 512-byte buffer used to store the lookup palette data for each frame. a 32-byte buffer is used to load the top 16 entries of the palette for 4-, 12-, or 16-bit pixel encodings, and a 512-byte buffer is used to load the entire 256-entry palette for 8-bit pixel encodings. note that the lcd ? s on-chip palette is not used for 12- and 16-bit pixel encodings; the pbs field must be programmed to select 12- and 16-bit pixel mode and the remainder of the 32 bytes at the top of the frame buffer must be zero-filled even though the data is not used. each time a new frame is fetched from the frame buffer, the lcd controller ? s palette is first loaded with the data contained within the palette buffer. each of the 16 or 256 palette entries is stored in adjacent half-words. figure 11-3 shows the palette-entry organization for little and big endian memory organization. the user can select how the lcd views the ordering of frame buffer palette/pixel entries by programming the big/little endian select (ble) bit in lcd control register 0. in little endian mode, palette entries are ordered starting with the least significant half-word, followed by the most significant. in big endian mode, palette entries are ordered starting with the most significant half-word, followed by the least significant. note that the ordering of the 4-bit r, g, b, and monochrome pixel data (and the pbs field) does not change between big and little endian modes; only the relative positioning of the individual 16-bit palette entries changes.
11-18 sa-1110 developer ? s manual peripheral control module figure 11-3. palette buffer format . individual palette entry bit1514131211109876543210 color unused pbs* red (r) green (g) blue (b) bit1514131211109876543210 mono unused pbs* unused monochrome (m) * note: pixel bit size (pbs) is contained only within the first palette entry (palette entry 0). 16- or 256-entry palette buffer bit 31 16 15 0 base + 0x0 palette entry 1 palette entry 0 base + 0x4 palette entry 3 palette entry 2 . . base + 0x1c palette entry 15 palette entry 14 base + 0x20 palette entry 17 palette entry 16 note: entries 16 through 254 do not exist for 4-, 12- and 16-bit/pixel modes. . . . base + 0x1fc palette entry 255 palette entry 254 base + 0x200 start of encoded pixel data little endian palette entry ordering bit 31 16 15 0 base + 0x0 palette entry 0 palette entry 1 base + 0x4 palette entry 2 palette entry 3 . . big endian palette entry ordering
sa-1110 developer ? s manual 11-19 peripheral control module the first palette entry (palette entry 0) also contains an extra field that is used to synchronously configure the lcd controller at the beginning of each frame. bits 12 and 13 of the first palette entry contain a field that is used to select the number of bits per pixel that is to be used in the next frame (see figure 11-3 ). the pixel bit size (pbs) bit-field is decoded by the lcd to correctly unpack pixel data into nibbles, bytes, 12-bit values, or half-words, and by the palette to tell it how many address bits are contained in the pixel data it is supplied, configuring the palette size to 16 or 256 entries. note that 12/16-bit pixel mode bypasses the lcd palette and supplies 12-bit values directly to the dither logic when passive mode is enabled, or 16-bit values directly to the output fifos when active mode is enabled. the following table shows the encoding of the pbs bit field. following the palette buffer is the pixel data buffer that contains one encoded pixel value for each of the pixels present on the display. the number of pixel data values depends on the size of the screen (1024 x 768 = 786,432 encoded pixel values). figure 11-4 through figure 11-7 show the memory organization within the frame buffer for each size pixel encoding. note that for 4-bit encodings, 2 pixels are placed into each byte, and for 12-bit encodings the value is right- justified within a half-word. these figures show the encoded pixel organization for little endian memory organization. the user can select how the lcd views the ordering of frame buffer pixel entries by programming the big/little endian select (ble) bit in lcd control register 0. in big endian mode, pixel entries are ordered starting with the most significant nibble, byte, or half-word and ending with the least significant. figure 11-4. 4 bits per pixel data memory organization (little endian) bit name description 13..12 pbs pixel bit size. 0x ? 4 bits per pixel, 16-entry palette, 32 bytes of palette buffer transferred each frame to palette. 01 ? 8 bits per pixel, 256-entry palette, 512 bytes of palette buffer transferred each frame to palette. 10 ? 12 bits per pixel in passive mode (pas=0), 16 bits per pixel in active mode (pas=1). palette unused, however, 32 bytes of ? dummy ? palette data is transferred each frame to palette. palette data must be zero-filled. 11 ? reserved. note : two 4-bit pixels are packed into each byte, and 12-bit pixels are right justified on half-word boundaries. bit 3210 4 bits/pixel encoded pixel data 3:0 bit312827242320191615121187430 base + 0x20 pixel 7 pixel 6 pixel 5 pixel 4 pixel 3 pixel 2 pixel 1 pixel 0 base + 0x24 pixel 15 pixel 14 pixel 13 pixel 12 pixel 11 pixel 10 pixel 9 pixel 8 ..
11-20 sa-1110 developer ? s manual peripheral control module figure 11-5. 8-bits per pixel data memory organization (little endian ) figure 11-6. 12-bits per pixel data memory organization (passive mode only) figure 11-7. 16-bits per pixel data memory organization (active mode only) ) bit76543210 8 bits/pixel encoded pixel data 7:0 bit3124231615 87 0 base + 0x200 pixel 3 pixel 2 pixel 1 pixel 0 base + 0x204 pixel 7 pixel 6 pixel 5 pixel 4 .. bit1514131211109876543210 12 bits/pixel unused red data 3:0 green data 3:0 blue data 3:0 bit 31 16 15 0 base + 0x20 pixel 1 pixel 0 base + 0x24 pixel 3 pixel 2 .. bit1514131211109876543210 16 bits/pixel encoded pixel data 15:0 bit 31 16 15 0 base + 0x20 pixel 1 pixel 0 base + 0x24 pixel 3 pixel 2
sa-1110 developer ? s manual 11-21 peripheral control module in dual-panel mode, pixels are presented to two halves of the screen at the same time (upper and lower). a second dma channel and input fifo exist to support dual-panel operation. the dma channels alternate service requests when filling the two input fifos. the palette buffer is implemented in dma channel 1, but not channel 2; the base address points to the top of the encoded pixel values for channel 2. the dma controller contains a base and current address pointer register. the end address is calculated automatically by the lcd using the display information such as pixels per line, lines per frame, single- or dual-panel mode, color or monochrome mode, and bits per pixel, which are programmed by the user. the base address of both dma channels must be configured such that the least significant four address bits are all zero (for example, address bits 3 through 0 must be zero). this requirement limits the base address of the frame buffer to start at even 4-word (or 16-byte) intervals. the frame buffer must contain an even multiple of 16 pixels for every line and must be aligned on a quadword boundary. many lcd displays are a multiple of 16 pixels wide; however, most passive lcd displays are not and will ignore extra pixels at the end of each line. thus for these types of displays that do not use an even multiple of 16 encoded pixel values, the user must adjust the start address for each line by adding between 1 and 15 ? dummy ? pixel values to the end of the previous line. for example, if the screen that is being driven is 107 pixels wide, and 4-bits/pixel mode is used, each line is 107 pixels or nibbles in length (53.5 bytes). the next nearest 16-pixel boundary occurs at 112 pixels or nibbles (56 bytes). thus, the user must start each new line in the frame buffer at multiples of 56 bytes by adding an extra 5 ? dummy ? pixels per line (2.5 bytes). the user must ensure that the panel being controlled does indeed ignore extra pixel clocks at the end of each line when a panel with line widths that are non-multiple of 16 pixels are used. the user must add extra space at the end of the frame buffer. the lcd ? s dma may overshoot the end of the frame buffer by one burst cycle (4-word read). the lcd ? s dma reads these extra values, but they are flushed from the input fifo each time the frame clock is pulsed. the user must ensure that the four words immediately following the end of the frame buffer reside in legal memory space (do not cause a bus error if read). since the lcd does not alter this memory (only reads are performed), these locations can be used for data storage unrelated to the lcd. the following equations are used to calculate the total frame buffer size in bytes that is accessed by the dma based on varying pixel size encodings and screen sizes. the first term in the equations represents the size of the palette buffer, the second term is the add-on for the dma overshoot at the end of the frame buffer, and the third term is the size required for the encoded pixel values. note that for dual-panel mode, the frame buffer size is equally distributed between the two dma channels and that dma channel 2 ? s buffer is either 32 or 512 bytes smaller (no palette buffer; that is, the first term in the equations is deleted). where n = 0 to 15 and is the number of extra ? dummy ? pixels required per line to make pixels/line an even multiple of sixteen. note: the base address of the frame buffer must start on even 4-word boundaries (the four least significant address bits 3:0 must be zero). framebuffersize 32 16 line s x columns () 2 --------------------------------------------------- - ?? ?? 2 n x lines () () ++ + = 4 bits/pixel: framebuffersize 512 16 line s x columns () () n x lines () ++ + = 8 bits/pixel: framebuffersize 32 16 2 line s x columns () () ++ = 12 or 16 bits/pixel:
11-22 sa-1110 developer ? s manual peripheral control module 11.7.1.3 input fifo data from the lcd ? s dma is directed either to the palette or the input fifo. the direction of data flow is switched whenever the lcd controller is first enabled and by each frame pulse. after the lcd controller is configured and enabled, the first 32 (4-, 12-, and 16-bits/pixel) or 512 (8-bit/pixel) bytes supplied by the dma are sent to the palette. all subsequent encoded pixel data is sent to the fifo. after an entire frame of pixels has been processed, the frame clock pin is pulsed to denote the start of the next frame. this signal is also used to change the direction of dma input data from the fifo back to the palette. a modulus of 8 (4-, 12-, and 16-bits/pixel) or 128 (8-bits/pixel) is used to count when loading the palette ram, depending on the pixel bit size shown above. a 7-bit counter is loaded each time a frame clock pulse occurs or the lcd is enabled, and is decremented each time a word is stored to the palette (two palette entries). when the counter wraps around to zero, the data input from the dma is switched back to the fifo. the lcd controller contains a 5-entry x 32-bit wide input fifo that is used to store encoded pixels fetched from the frame buffer. the fifo signals a service request to the dma whenever four entries of the fifo are empty. in turn, the dma automatically fills the fifo with a 4-word burst. pixel data from the frame buffer remains packed within individual 32-bit words when it is loaded into the fifo. the lcd controller ? s port size is 32 bits wide to accommodate the heavy data flow from the frame buffer. depending on the number of bits per pixel, as words are taken from the bottom of the fifo, they are unpacked and supplied to the lookup palette in nibbles (4 bits/pixel) or bytes (8 bits/pixel) to the dither logic (12 bits/pixel), or directly to the pins in half-word increments (16 bits/pixel). each time a word is taken from the bottom of the fifo, the entry is invalidated and all data in the fifo moves down one position. when four entries are empty, a service request is issued to the dma. 11.7.1.4 lookup palette the encoded pixel data taken from the bottom entry of the input fifo is used as an address to index and select individual palette locations. four-bit pixel encodings address 16 locations and 8-bit pixel encodings select any of the 256 palette entries. note that the user may program 1, 2, and 3 bits/pixel as well by zeroing out the upper 3, 2 or 1 bits of each encoded pixel value in the frame buffer, respectively. however, for 1, 2, and 3 bits/pixel, the encoded pixel size remains at 4 bits within the frame buffer and within the lcd controller ? s input fifo. once a palette entry is selected by the encoded pixel value, the contents of the entry is sent to the color/gray-scale space/time base dither circuit. in color mode, the value within the palette is made up of three 4-bit fields, one for each color component ? red, green, and blue. in monochrome mode, only one 4-bit value is present (see figure 11-3 ). for both modes, the 4-bit values represent one of 15 intensity levels. for color operation, an individual frame is limited to a selection of 256 colors (the number of palette entries). however, the lcd controller is capable of generating a total of 3375 colors (15 levels per color ^ 3 colors = 3375). when 12 or 16 bits per pixel mode is enabled, the palette is bypassed. for passive displays, 12-bit pixels are sent directly to the dither logic; for active displays, 16-bit pixels are sent to the output fifo to be driven directly to the lcd ? s data pins.
sa-1110 developer ? s manual 11-23 peripheral control module 11.7.1.5 color/gray-scale dithering for passive displays, entries selected from the lookup palette are sent to the color/gray-scale space/time base dither generator. each 4-bit value is used to select one of 15 intensity levels. note that two of the 16 dither values are identical (always high). the color/gray intensity is controlled by turning individual pixels on and off at varying periodic rates. for some screens, more intense colors/grays are produced by making the average time the pixel is high longer than the average time it is low, while other screens produce more intense colors/grays when the average time the pixel is low is longer. the user should program the palette appropriately depending on whether a one on the pixel line turns the pixel on or off. the dither generator also uses the intensity of adjacent pixels in its calculations to give the screen image a smooth appearance. the proprietary dither algorithm is optimized to provide a range of intensity values that match the eye ? s visual perception of color/gray gradations. in color mode, three separate dither blocks are used to process the three color components: red, green, and blue. table 11-7 summarizes the duty cycle and resultant intensity level for all 15 color/gray-scale levels. 11.7.1.6 output fifo the lcd controller contains a 19-entry x 16-bit wide output fifo that is used to store pixel pin data before it is driven out to the pins. each time a modulated pixel value is output from the dither generator, it is placed into a serial shifter. the size of the shifter is controlled by programming the color/monochrome select and single- and dual-panel, double pixel data, and passive/active select bits in the lcd ? s control registers and the pixel bit size within palette entry 0 in the frame buffer. the shifter can be configured to be 4, 8, or 16 bits wide. four pins are used for single-panel monochrome screens; 8 pins are used for single- and dual-panel monochrome screens as well as single-panel color displays; 12 pins are used for active displays; and 16 pins are used for dual-panel color and active displays. once the correct number of pixels have been placed within the shifter (4-, 8-, or 16-pixel values), the value is transferred to the top of the output fifo. the value is then transferred down until it reaches the last empty location within the fifo. each time a value is taken from the bottom of the fifo, the entry is invalidated and all data in the fifo moves down one position. table 11-7. color/gray-scale intensities and modulation rates dither value (4-bit value from palette) intensity (0% is black) modulation rate (ratio of on to on+off pixels) 0000 0.0% 0 0001 11.1% 1/9 0010 20.0% 1/5 0011 26.7% 4/15 0100 33.3% 3/9 0101 40.0% 2/5 0110 44.4% 4/9 0111 50.0% 1/2 1000 55.6% 5/9 1001 60.0% 3/5 1010 66.6% 6/9 1011 73.3% 11/15 1100 80.0% 4/5 1101 88.9% 8/9 1110 100.0% 1 1111 100.0% 1
11-24 sa-1110 developer ? s manual peripheral control module 11.7.1.7 lcd controller pins pixel data is removed from the bottom of the output fifo and is driven in parallel onto the lcd ? s data lines on the edge selected by the pixel clock polarity (pcp) bit. for a 4-bit wide bus, data is driven onto the lcd data lines ldd 3:0 starting with the most significant bit. for an 8-bit wide bus, data is driven onto ldd 7:0; for a 12-bit bus gpio 5:2 and ldd 7:0; and for a 16-bit bus gpio 9:2 and ldd 7:0. in monochrome dual-panel mode, the pixels for the upper half of the screen are driven onto ldd 3:0 and the lower half to ldd 7:4. in color dual-panel mode, the upper panel pixels are driven onto ldd 7:0 and the lower panel pixels to gpio 9:2. note that for a 4-bit wide bus, data is output via the ldd 3:0 pins and the lcd 7:4 pins are held low by the lcd controller. the user cannot use this pins as gpios in this mode. however, for a 12-bit wide bus, the user is free to use gpio 9:6 as general- purpose i/o signals. when an entire line of pixels has been output to the lcd controller screen, the line clock pin (l_lclk) is toggled. likewise, when an entire frame of pixels has been output to the lcd controller screen, the frame clock pin (l_fclk) is toggled. to prevent a dc charge from building within a passive display, its power and ground supplies must be switched periodically. the lcd controller signals the display to switch the polarity by toggling the ac bias pin (l_bias). the user can control the frequency of the bias pin by programming the number of line clock transitions between each toggle. when active display mode is enabled, the timing of the pixel, line, and frame clocks and the ac bias pin changes. the pixel clock transitions continuously in this mode as long as the lcd is enabled. the ac bias pin functions as an output enable. when it is asserted, the display latches data from the lcd ? s pins using the pixel clock. the line clock pin is used as the horizontal synchronization signal (hsync) and the frame clock as the vertical synchronization signal (vsync). the timing of the line and frame clock pins is programmable to support both passive and active mode. programming options include: wait state insertion both at the beginning and end of each line and frame; pixel clock; line clock; frame clock; output enable signal polarity; and frame clock pulse width. when the lcd controller is disabled, control of all 12 of its pins is relinquished to the peripheral pin controller (ppc) unit to be used as general-purpose digital i/o pins that are noninterruptible. see the section 11.13 on page 167 for a description of the programming and operation of the ppc unit. 11.7.2 lcd controller register definitions the lcd controller contains four control registers, four dma address registers, and one status register. the control registers contain bit fields to enable and disable the lcd controller; to define the height and width of the screen being controlled; and to indicate single- versus dual-panel display mode, color versus monochrome mode, passive versus active display, polarity of the control pins, pulse width of the line and frame clocks, pixel clock and ac bias pin frequency. ac bias pin toggles per interrupt the number of waitstates to insert before and after each line, after each frame, and various interrupt masks. an additional control field exists to tune the dma ? s performance based on the type of memory system in which the sa-1110 is used. this field controls the placement of a minimum delay between each lcd dma request to ensure enough bus bandwidth is given to other arm system bus masters for accesses. the dma address registers are used to define the base addresses of the off-chip frame buffers and to which address the dma is currently pointing. both of these registers exist for dma channels 1 and 2. the status registers contain bits that signal input and output fifo overrun and underrun errors, dma bus errors, when the dma base address can be reprogrammed, when the last active frame has completed after the lcd is disabled, and each time the ac bias pin has toggled a programmed number of times. each of these hardware-detected events signals an interrupt request to the interrupt controller.
sa-1110 developer ? s manual 11-25 peripheral control module 11.7.3 lcd controller control register 0 lcd controller control register 0 (lccr0) contains 10 bit fields that are used to control various functions within the lcd controller. 11.7.3.1 lcd enable (len) the lcd enable (len) bit is used to enable and disable all lcd controller operation. when len=0, the lcd controller is disabled and control of all 12 of its pins is given to the peripheral pin controller (ppc) unit to be used as general-purpose i/o (noninterruptible). when len=1, the lcd controller is enabled. note that all other control registers should be initialized before setting len. the user can program lccr0 last, and configure all 10 bit fields at the same time via a word write to the register. if the user clears len while the lcd controller is enabled, it will complete transmission of the current frame before being disabled. completion of the current frame is signalled by the lcd when it sets the lcd disable done flag (ldd) within the lcd status register that generates an interrupt request. the user should use a read-modify-write procedure to clear len because the other bit-fields within lccr0 continue to be used by the lcd controller after len is cleared until the frame that is currently in progress completes. when the lcd controller is disabled, control of all 12 of its pins is given to the peripheral pin controller (ppc) so that they may be used for general-purpose input and output (noninterruptible). see the section 11.13, ? peripheral pin controller (ppc) ? on page 11-167 for a description of the ppc. 11.7.3.2 color/monochrome select (cms) the color/monochrome select (cms) bit selects whether the lcd controller operates in color or monochrome mode. when cms=0, color mode is selected, palette entries are 12 bits wide (4 bits per color), 8 data pins are enabled for single-panel mode, 16 data pins are enabled for dual-panel mode (gpio pins 2..9 are used as the extra 8 data output pins), and all three dither blocks are used, one each for the red, green, and blue pixel components. when cms=1, monochrome mode is selected, palette entries are 4 bits wide (15 levels of gray-scale), 4 or 8 data pins are enabled for single-panel mode, and 8 data pins are enabled for dual-panel mode. 11.7.3.3 single-/dual-panel select (sds) in passive mode (pas=0), the single-/dual-panel select (sds) bit is used to select the type of display control that is implemented by the lcd screen. when sds=0, single-panel operation is selected (pixels presented to screen a line at a time), and when sds=1, dual-panel operation is selected (pixels presented to screen two lines at a time). single-panel lcd drivers have one line/row shifter and driver for pixels, and one line pointer; dual-panel lcd controller drivers have two line/row shifters (one for the top half of the screen, one for the bottom), and two line pointers (one for the top half of the screen, one for the bottom). when dual-panel mode is programmed, both of the lcd controller ? s dma channels are used. dma channel 1 is used to load the palette ram from the frame buffer and to drive the upper half of the display, and dma channel 2 drives the lower half. the two channels alternate when fetching data for both halves of the screen, placing encoded pixel values within the two separate input fifos. when programming dual-panel operation, the user must perform the following sequence in order: disable the lcd (len=0), program dual-panel mode (sds=0->1), write the upper panel dma base address, write the lower panel dma base address, and enable the lcd (len=0->1). when dual-panel operation is enabled, the lcd controller doubles its pin uses; thus, for monochrome screens 8 pins are used, and for color screens, 16 pins are used.
11-26 sa-1110 developer ? s manual peripheral control module table 11-8 shows the lcd data pins and gpio pins used for each mode of operation and the ordering of pixels delivered to a screen for each mode of operation. figure 11-8 shows the lcd data pin pixel ordering. note that when dual-panel color operation is enabled, the user must configure gpio pins 2 through 9 as outputs by setting bits 2..9 within the gpio pin direction register (gpdr) and gpio alternate function register (gafr). see the section 9, ? system control module ? on page 9-1 for configuration information. also note that sds is ignored in active mode (pas=1). . 1 double-pixel data mode (dpd) = 1. table 11-8. lcd controller data pin utilization color/ monochrome panel single/ dual panel passive/ active panel screen portion pins monochrome single passive whole ldd 3:0 monochrome single passive whole ldd 7:0 1 monochrome dual passive top ldd 3:0 bottom ldd 7:4 color single passive whole ldd 7:0 color dual passive top ldd 7:0 bottom gpio 9:2 color single active whole gpio 9:2, ldd 7:0
sa-1110 developer ? s manual 11-27 peripheral control module figure 11-8. lcd data-pin pixel ordering ldd 0 ldd 1 ldd 2 ldd 3 ldd 0 ldd 1 ldd 2 ldd 3 ldd 0 top left corner of screen column 0 column 1 column 2 column 3 column 4 column 5 column 6 column 7 column 8 row 0 row 1 row 2 row 3 ldd 0 ldd 1 ldd 2 ldd 3 ldd 0 ldd 1 ldd 2 ldd 3 ldd 0 ldd 0 ldd 1 ldd 2 ldd 3 ldd 0 ldd 1 ldd 2 ldd 3 ldd 0 ldd 0 ldd 1 ldd 2 ldd 3 ldd 0 ldd 1 ldd 2 ldd 3 ldd 0 passive monochrome single-panel display pixel ordering ldd 0 ldd 1 ldd 2 ldd 3 ldd 4 ldd 5 ldd 6 ldd 7 ldd 0 top left corner of screen column 0 column 1 column 2 column 3 column 4 column 5 column 6 column 7 column 8 row 0 row 1 row 2 row 3 ldd 0 ldd 1 ldd 2 ldd 3 ldd 4 ldd 5 ldd 6 ldd 7 ldd 0 ld0 0 ldd 1 ldd 2 ldd 3 ldd 4 ldd 5 ldd 6 ldd 7 ldd 0 ldd 0 ldd 1 ldd 2 ldd 3 ldd ldd 5 ldd 6 ldd 7 ldd 0 passive monochrome single-panel double-pixel display pixel ordering ldd 7 ldd 6 ldd 0 ldd 7 ldd 1 ldd 0 ldd 7 top left corner of screen column 0 column 0 column 2 column 2 column 4 column 5 column 5 row 0 row 1 row n/2 row n/2+1 ldd 7 ldd 6 ldd 0 ldd 7 ldd 1 ldd 0 ldd 7 gpio 9 gpio 8 gpio 2 gpio 9 gpio 3 gpio 2 gpio 9 gpio 9 gpio 8 gpio 2 gpio 9 gpio 3 gpio 2 gpio 9 ldd 7 ldd 6 ldd 5 ldd 4 ldd 3 ldd 2 ldd 1 ldd 0 ldd 7 top left corner of screen column 0 column 0 column 0 column 1 column 1 column 1 column 2 column 2 column 2 row 0 row 1 row 2 row 3 ldd 7 ldd 6 ldd 5 ldd 4 ldd 3 ldd 2 ldd 1 ldd 0 ldd 7 ldd 7 ldd 6 ldd 5 ldd 4 ldd 3 ldd 2 ldd 1 ldd 0 ldd 7 ldd 7 ldd 6 ldd 5 ldd 4 ldd 3 ldd 2 ldd 1 ldd 0 ldd 7 passive color single-panel display pixel ordering red green blue red green blue red green blue red green green blue blue red green ldd 0 ldd 1 ldd 3 ldd 0 ldd 2 ldd 3 ldd 0 top left corner of screen row 0 row 1 row n/2 row n/2+1 ldd 0 ldd 1 ldd 3 ldd 0 ldd 2 ldd 3 ldd 0 ldd 2 ldd 1 ldd 2 ldd 1 ldd 4 ldd 5 ldd 7 ldd 4 ldd 6 ldd 7 ldd 4 ldd 4 ldd 5 ldd 7 ldd 4 ldd 6 ldd 7 ldd 4 ldd 6 ldd 5 ldd 6 ldd 5 column 0 column 1 column 2 column 3 column 4 column 5 column 6 column 7 column 8 passive color dual-panel display pixel ordering passive monochrome dual-panel display pixel ordering n = # of rows n = # of rows
11-28 sa-1110 developer ? s manual peripheral control module 11.7.3.4 lcd disable done interrupt mask (ldm) the lcd disable done interrupt mask (ldm) bit is used to mask or enable interrupt requests that are asserted after the lcd is disabled and the frame currently being output to the pins has completed. when ldm=0, the interrupt is enabled, and whenever the lcd disable done (ldd) status bit within the lcd status register (lcsr) is set (one), an interrupt request is made to the interrupt controller. when ldm=1, the interrupt is masked and the state of the ldd status bit is ignored by the interrupt controller. note that programming ldm=1 does not affect the current state of ldd or the lcd controller ? s ability to set and clear ldd; it only blocks the generation of the interrupt request. this interrupt is particularly useful when the user needs to ensure the lcd has been disabled and the current frame that is being output to the pins has completed, before entering sleep mode. if the user disables the lcd, but does not need to enter sleep mode, this interrupt can be masked using ldm. 11.7.3.5 base address update interrupt mask (bam) the base address update interrupt mask (bam) bit is used to mask or enable interrupt requests that are asserted at the beginning of each frame when the lcd ? s base address pointer is transferred to the current address pointer within the lcd ? s dma. when bam=0, the interrupt is enabled, and whenever the base address update (bau) status bit within the lcd status register (lcsr) is set (one) an interrupt request is made to the interrupt controller. when bam=1, the interrupt is masked and the state of the bau status bit is ignored by the interrupt controller. note that programming bam=1 does not affect the current state of bau or the lcd controller ? s ability to set and clear bau; it only blocks the generation of the interrupt request. note that this interrupt mask is particularly useful when the user wishes to enter idle mode to turn off the cpu and to display the same image (the off-chip frame buffer data does not change). by masking the bau interrupt, the sa-1110 is not forced out of idle mode at the end of each frame. 11.7.3.6 error interrupt mask (erm) the error interrupt mask (erm) bit is used to mask or enable interrupt requests that are asserted whenever a bus error or input/output fifo over/underrun error occurs. when erm=0, all error interrupts are enabled, and whenever the bus error (ber) status bit or any of the input/output fifo over/underrun (iol, iul, iou, iuu, ool, oul, oou, ouu) status bits within the lcd status register (lcsr) are set (one), an interrupt request is made to the interrupt controller. when erm=1, error interrupts are masked; the state of all of the error status bits (ber, iol, iul, iou, iuu, ool, oul, oou, ouu) are ignored by the interrupt controller. note that programming erm=1 does not affect the current state of these status bits or the lcd controller ? s ability to set and clear them; it only blocks the generation of the interrupt requests. 11.7.3.7 passive/active display select (pas) the passive/active display select (pas) bit selects whether the lcd controller operates in passive (stn) or active (tft) display control mode. when pas=0, passive or stn mode is selected, all lcd data flow operates normally (including the use of the lcd ? s dither logic), and all lcd controller pin timing operates as described in the preceding sections. when pas=1, active or tft mode is selected. for 4- and 8-bit per pixel modes, pixel data is transferred via the dma from off-chip memory to the input fifo, is unpacked and used to select an entry from the palette, just like passive mode. however, the value read from the palette bypasses the lcd ? s dither logic, and is sent directly to the output fifo to be output on the lcd ? s data pins. this 12-bit value output to the pins represents 4 bits of red, 4 bits of green, and 4 bits of blue data. for 12- and 16-bit pixel encoding mode, the pixel size within the frame buffer is increased to 16 bits.
sa-1110 developer ? s manual 11-29 peripheral control module thus two 16-bit values are packed into each word in the frame buffer. each 16-bit value is transferred via the dma from off-chip memory to the input fifo. unlike 4- and 8-bit per pixel modes, the 16-bit value bypasses both the palette and the dither logic, and is placed directly in the output fifo to be output on the lcd ? s data pins. increasing the size of the pixel representation allows a total of 64k colors to be generated. this 16-bit value output to the pins can be organized into one of three rgb color formats: 6 bits of red, 5 bits of green, and 5 bits of blue data; 5 bits of red, 6 bits of green, and 5 bits of blue data; 5 bits of red, 5 bits of green, and 6 bits of blue data, as specified by the user. note that the pin timing of the lcd changes when active mode is selected. timing of each pin is described in subsequent bit-field sections for both passive and active mode. additionally, the lcd controller can be configured in active color display mode and used with an external dac and optionally an external palette to drive a video monitor. note that only monitors that implement the rgb data format can be used; the lcd controller does not support the ntsc standard. figure 11-9 shows which bits within each frame buffer entry (for 16-bit/pixel mode) and which bits within a selected palette entry (for 4- and 8-bit/pixel mode) are sent to the individual lcd data pins. in active mode, gpio pins 2..9 are also used. note that the user must configure gpio pins 2..5 as outputs (for 4- and 8-bit/pixel mode), and gpio pins 2..9 as outputs (for 16-bit/pixel mode) by setting the appropriate bits within the gpio pin direction register (gpdr) and gpio alternate function register (gafr). see the general-purpose i/o section for configuration information. if gpdr 6:9 = gafr 6:9 = 4 ? hf in 4- or 8-bit/pixel mode, then gpio 6:9 are pulled low during lcd operation in active mode. however, the user is free to clear gafr 6:9, allowing the gpio unit to assume control of these pins to be used as normal digital i/os. in general, the user may clear any number of gafr bits 2..9, to allow the gpio unit to assume control of unused gpio pins for normal digital i/o depending on the required number of data pins. if the panel that is being controlled contains more data pin inputs than 16, the user may still use the sa-1110 ? s lcd controller, but the panel will be limited to a total of 64 k colors. if the user wishes to maintain the panel ? s full range of colors and increase the granularity of the spectrum, the lcd ? s 16 data pins should be interfaced to the panel ? s most significant r, g, and b pixel data input pins and the least significant r, g, and b data pins should be tied either high or low. if instead, the user wishes to maintain the granularity of the spectrum and limit the overall range of colors possible, the lcd ? s 16 data pins should be interfaced to the panel ? s least significant r, g, and b pixel data input pins and the most significant data pins should again be tied either high or low. figure 11-9. frame buffer/palette bits output to lcd data pins in active mode 1 gpio pins 6..0 are grounded by the lcd in this mode. however, if gafr bit 6..9 are cleared within the system control module, these pins can be used as normal gpio pins. 16-bit/pixel mode frame buffer entry r 5 r 4 r r 2 r r g4 g 3 g 2 g1 g 0 b 4 b 3 b 2 b 1 b 0 r 4 r 3 r r 1 r 0 g 5 g4 g 3 g 2 g1 g 0 b 4 b 3 b 2 b 1 b 0 r 4 r 3 r 2 r 1 r 0 g 4 g3 g 2 g 1 g 0 b 5 b 4 b 3 b 2 b 1 b 0 bit1514131211109876543210 data pin gpio 9 gpio 8 gpio 7 gpio 6 gpio 5 gpio 4 gpio 3 gpio 2 ldd 7 ldd 6 ldd 5 ldd 4 ldd 3 ldd 2 ldd 1 ldd 0 4- or 8-bit/pixel mode selected palette entry r 3 r 2 r 1 r 0 g 3 g 2 g 1 g 0 b 3 b b b 0 bit vss 1 vssvssvss11109876543210 data pin gpio 9 gpio 8 gpio 7 gpio 6 gpio 5 gpio 4 gpio 3 gpio 2 ldd 7 ldd 6 ldd 5 ldd 4 ldd 3 ldd 2 ldd 1 ldd 0
11-30 sa-1110 developer ? s manual peripheral control module 11.7.3.8 big/little endian select (ble) the big/little endian select (ble) bit selects whether the lcd controller views external memory organization of the frame buffer as big or little endian. when ble=0, little endian mode is selected and pixel data is organized within the off-chip frame buffer as shown in figure 11-4 through figure 11-7 . pixels are packed into words starting with the least-significant nibble, byte, or half-word. when ble=1, big endian mode is selected and pixel data is organized in memory starting with the most significant nibble, byte, or half-word. when ble=1, palette entries are packed into half-words starting with the most significant half-word. note that ble does not affect the ordering of the 4-bit red/green/blue bit fields, the 4-bit monochrome field within each 16-bit palette entry, or the 2-bit pixel bit size (pbs) field contained with palette entry 0. 11.7.3.9 double-pixel data (dpd) pin mode the double-pixel data (dpd) pin mode bit selects whether four or eight data pins are used to output pixel data to the lcd screen in single-panel monochrome mode. when dpd=0, ldd 3:0 pins are used to output 4-pixel values each pixel clock transition; when dpd=1, ldd 7:0 pins are used to output 8-pixel values each pixel clock. see the following table and figure for a comparison of how the lcd ? s data pins are used in each of its display modes. note that dpd does not affect dual-panel monochrome mode nor any of the color modes. 11.7.3.10 palette dma request delay (pdd) the 8-bit palette dma request delay (pdd) field is used to select the minimum number of memory controller clock cycles (half the frequency of the cpu clock) to wait between the servicing of each dma request issued while the on-chip palette is loaded. when the palette is loaded at the beginning of every frame, either 32 or 512 bytes of data must be accessed by the lcd ? s dma. since the lcd ? s dma is the highest priority master on the arm system bus, other masters (such as the cpu) will be denied access to the bus and may be starved. using pdd allows other masters to gain access of the bus in between palette dma loads, so that they are not locked from accessing the bus for an unacceptable period of time. note that pdd does not apply to normal input fifo dma requests for frame buffer information since these dma requests do not occur back-to-back. the input fifo dma request rate is a function of the rate at which pixels are displayed on the screen. after a palette dma burst cycle has completed, the value contained within pdd is loaded to a down counter that disables the palette from issuing another dma request until the counter decrements to zero. this counter ensures that the lcd ? s dma does not fully consume the bandwidth of the sa-1110 ? s system bus. once the counter reaches zero, any pending or future dma requests by the palette cause the dma to arbitrate for the arm system bus (asb). once the dma burst cycle has completed, the process starts over and the value in pdd is loaded to the counter to create another wait state period, which disables the palette from issuing a dma request. pdd can be programmed with a value that causes the fifo to wait between 0 to 255 memory clock cycles after the completion of one dma request to the start of the next request. when pdd=8 ? h00, the fifo dma request delay function is disabled. note that waitstates are not inserted between dma burst cycles that are used to fill the input fifo with pixel data.
sa-1110 developer ? s manual 11-31 peripheral control module the following table shows the location of all 10 bit-fields located in lcd control register 0 (lccr0). the user must program the control bits within all other control registers before setting len=1 (a word write can be used to configure lccr0 while setting len after all other control registers have been programmed), and also must disable the lcd controller when changing the state of any control bit within the lcd controller. note that writes to reserved bits are ignored and reads return zeros. 0h b010 0000 lccr0: lcd control register 0 read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved pdd reserved dpd ble pas reserved erm bam ldm sds cms len reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (sheet 1 of 2) bits name description 0len lcd controller enable. 0 ? lcd controller disabled. control of l_pclk, l_lclk, l_fclk, l_bias, and the ldd 7:0 pins is given to the ppc unit to be used as general-purpose i/o pins. 1 ? lcd controller enabled. 1cms color/monochrome select. 0 ? color operation enabled. 1 ? monochrome operation enabled. 2sds single-/dual-panel display select. 0 ? single-panel display enabled. ldd 3:0 used for monochrome, ldd 7:0 used for color. 1 ? dual-panel display enabled. ldd 7:0 used for monochrome, ldd 7:0 and gpio 9:2 used for color (user must also program gpdr and gafr registers within the gpio unit). note: sds is ignored in active mode (pas=1). for dual-panel operation, the user must disable the lcd, set sds, program the upper panel dma base address, program the lower panel dma base address, and enable the lcd. 3ldm lcd disable done mask. 0 ? lcd disable done condition generates an interrupt (state of ldd status sent to the interrupt controller). 1 ? lcd disable done condition does not generate an interrupt (ldd status bit ignored). 4bam base address update mask. 0 ? base address update condition generates an interrupt (state of bau status sent to the interrupt controller). 1 ? base address update condition does not generate an interrupt (bau status bit ignored). 5erm error mask. 0 ? bus error and fifo over/underrun errors generate an interrupt (state of ber, iol, iul, iou, iuu, ool, oul, ouu status sent to the interrupt controller). 1 ? bus error and fifo over/underrun errors do not generate an interrupt (ber, iol, iul, iou, iuu, ool, oul, oou, ouu status bits ignored). 6 ? reserved. 7pas passive/active display select. 0 ? passive or stn display operation enabled. dither logic is enabled. 1 ? active or tft display operation enable. dither logic bypassed, pin timing changes to support continuous pixel clock, output enable, vsync, hsync signals.
11-32 sa-1110 developer ? s manual peripheral control module 8ble big/little endian select. 0 ? little endian operation is selected, half-word palette buffer data is packed into individual words of memory starting with the least significant half-word, and frame buffer pixel data is packed into individual words of memory starting with the least significant nibble, byte, or half-word. 1 ? big endian operation is selected, half-word palette buffer data is packed into individual words of memory starting with the most significant half-word, and frame buffer pixel data is packed into individual words of memory starting with the most significant nibble, byte, or half-word. 9dpd double-pixel data pin mode. 0 ? in single-panel monochrome operation, four pixels are presented to ldd 3:0 each pixel clock. 1 ? in single-panel monochrome operation, eight pixels are presented to ldd 7:0 each pixel clock. note: this bit is ignored in all other modes of operation except for single-panel monochrome. 11..10 ? reserved. 19..12 pdd palette dma request delay. value (from 0 to 255) used to specify the number of memory controller clocks (half the speed of the cpu clock). the on-chip palette dma request should be disabled after each dma transfer to the palette. the clock count starts after the last write of each burst cycle. while the counter is decrementing, all dma requests from the palette are masked. when the counter reaches zero, any pending or subsequent dma requests are allowed to generate a 4-word burst. programming pdd=8h ? 00 disables this function. 31..20 ? reserved. 0h b010 0000 lccr0: lcd control register 0 read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved pdd reserved dpd ble pas reserved erm bam ldm sds cms len reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (sheet 2 of 2) bits name description
sa-1110 developer ? s manual 11-33 peripheral control module 11.7.4 lcd controller control register 1 lcd controller control register 1 (lccr1) contains four bit fields that are used as modulus values for a collection of down counters, each of which performs a different function to control the timing of several of the lcd ? s pins. 11.7.4.1 pixels per line (ppl) the pixels per line (ppl) bit-field is used to specify the number of pixels in each line or row on the screen. ppl is a 10-bit value that represents between 16 and 1024 pixels per line. ppl is used to count the correct number of pixel clocks that must occur before the line clock can be asserted. the user should program ppl with the desired number of pixels per line minus 16. note that the bottom four bits of ppl are not implemented and therefore are not writable. reads of these bits return zeros because the lcd controller only supports displays that are a multiple of 16 pixels wide. many displays exist that are not a multiple of 16, but are able to ignore added pixels at the end of each line. for example, if the display being controlled is 250 pixels wide, the nearest greater multiple of 16 is 256. the user should program ppl to 256-16 = 240 (10 ? h0f0). in this case, the user must also add the appropriate number of ? dummy ? pixel values (between 1 and 15) to the frame buffer. again, for a 250 pixel wide display, and if 4-bit/pixel mode is used, each line is 250 nibbles or 125 bytes in length. the next nearest pixel boundary occurs at 256 pixels or nibbles (128 bytes). thus the user must start each new line in the frame buffer at multiples of 128 bytes by adding an extra 6 ? dummy ? pixels per line (3 bytes). note that the user must also ensure that the display that is being controlled will ignore any additional pixel clocks at the end of each line because these ? dummy ? pixel values will be output to the display and the pixel clock will continue to transition until the ppl+16 value is reached. 11.7.4.2 horizontal sync pulse width (hsw) the 6-bit horizontal sync pulse width (hsw) field is used to specify the pulse width of the line clock in passive mode or horizontal synchronization pulse in active mode. l_lclk is asserted each time a line or row of pixels is output to the display and a programmable number of pixel clock waitstates have elapsed. when line clock is asserted, the value in hsw is transferred to a 6-bit down counter, which uses the programmed pixel clock frequency to decrement. when the counter reaches zero, the line clock is negated. hsw can be programmed to generate a line clock pulse width ranging from 1 to 64 pixel clock periods. the user should program hsw with the desired number of pixel clocks minus one. note that the pixel clock does not transition during the line clock pulse in passive display mode, but does transition in active display mode. also note that the polarity (active and inactive state) of the line clock pin is programmed using the horizontal sync polarity (hsp) bit in lccr3. 11.7.4.3 end-of-line pixel clock wait count (elw) the 8-bit end-of-line pixel clock wait count (elw) field is used to specify the number of ? dummy ? pixel clocks to insert at the end of each line or row of pixels before pulsing the line clock pin. once a complete line of pixels is transmitted to the lcd driver, the value in elw is used to count the number of pixel clocks to wait before pulsing the line clock. elw generates a wait period ranging from 1 to 256 pixel clock cycles. the user should program elw with the desired number of pixel clocks minus one. note that the pixel clock pin, l_pclk, does not transition during the these ? dummy ? pixel clock cycles in passive display mode (pixel clock transitions continuously in active display mode).
11-34 sa-1110 developer ? s manual peripheral control module 11.7.4.4 beginning-of-line pixel clock wait count (blw) the 8-bit beginning-of-line pixel clock wait count (blw) field is used to specify the number of ? dummy ? pixel clocks to insert at the beginning of each line or row of pixels. after the line clock for the previous line has been negated, the value in blw is used to count the number of pixel clocks to wait before starting to output the first set of pixels in the next line. blw generates a wait period ranging from 1 to 256 pixel clock cycles. the user should program blw with the desired number of pixel clocks minus one. note that the pixel clock pin, l_pclk, does not transition during these ? dummy ? pixel clock cycles in passive display mode (pixel clock transitions continuously in active display mode). the following table shows the location of the four bit fields located in lcd control register 1 (lccr1). the lcd controller must be disabled (len=0) when changing the state of any field within this register. 0h b010 0020 lccr1: lcd control register 1 read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 blw elw hsw ppl reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 bits name description 9..0 ppl pixels per line. value (from 1 to 1024). used to specify number of pixels contained within each line on the lcd display. pixels/line = (ppl+16). note that ppl 3:0 are not implemented but return zeros when read. 15..10 hsw horizontal sync pulse width. value (from 1 to 64). used to specify number of pixel clock periods to pulse the line clock at the end of each line. hsync pulse width = (hsw+1). note that pixel clock is held in its inactive state during the generation of the line clock in passive display mode and is permitted to transition in active display mode. 23..16 elw end-of-line pixel clock wait count. value (from 1 to 256). used to specify number of pixel clock periods to add to the end of a line transmission before line clock is asserted. eol = (elw+1). note that pixel clock is held in its inactive state during the end-of-line wait period in passive display mode and is permitted to transition in active display mode. 31..24 blw beginning-of-line pixel clock wait count. value (from 1 to 256). used to specify number of pixel clock periods to add to the beginning of a line transmission before the first set of pixels is output to the display. bol wait = (blw+1). note that pixel clock is held in its inactive state during the beginning-of-line wait period in passive display mode and is permitted to transition in active display mode.
sa-1110 developer ? s manual 11-35 peripheral control module 11.7.5 lcd controller control register 2 lcd controller control register 2 (lccr2) contains four bit fields that are used as modulus values for a collection of down counters, each of which performs a different function to control the timing of several of the lcd ? s pins. 11.7.5.1 lines per panel (lpp) the lines per panel (lpp) bit field is used to specify the number of lines or rows present on the lcd panel being controlled. in single-panel mode, it represents the total number of lines for the entire lcd display. in dual-panel mode, it represents half the number of lines of the entire lcd display because it is split into two panels. lpp is a 10-bit value that represents between 1 and 1024 lines per screen. the user should program lpp with the desired height of the display minus one. lpp is used to count the correct number of line clocks that must occur before the frame clock can be pulsed. the lcd ? s dma may overshoot the end of frame buffer by one burst cycle (4-word read). the lcd ? s dma reads these extra values but they are flushed from the input fifo each time the frame clock is pulsed. the user must ensure that the four words immediately following the end of the frame buffer reside in legal memory space (do not cause a bus error if read). because the lcd does not alter this memory (only reads are performed), these locations can be used for data storage unrelated to the lcd. 11.7.5.2 vertical sync pulse width (vsw) the 6-bit vertical sync pulse width (vsw) field is used to specify the pulse width of the vertical synchronization pulse in active mode, or is used to add extra ? dummy ? line clock waitstates between the end and beginning of frame in passive mode. in active mode (pas=1), l_fclk is used to generate the vertical sync signal and is asserted each time the last line or row of pixels for a frame is output to the display and a programmable number of line clock waitstates have elapsed as specified by elw. when l_fclk is asserted, the value in vsw is transferred to a 6-bit down counter, which uses the line clock frequency to decrement. when the counter reaches zero, l_fclk is negated. vsw can be programmed to generate a vertical sync pulse width ranging from 1 to 64 line clock periods. the user should program vsw with the desired number of line clocks minus one. note that the line clock does not transition during generation of the vertical sync pulse. also note that the polarity (active and inactive state) of the l_fclk pin is programmed using the frame clock polarity (fcp) bit in lccr3. in passive mode (pas=0), vsw does not affect the timing of the l_fclk pin, but rather can be used to add extra line clock waitstates between the end of each frame and the beginning of the next frame. when the last line clock of a frame is negated, the value in vsw is transferred to a 6-bit down counter that uses the line clock frequency to decrement. when the counter reaches zero, the next frame is permitted to begin. vsw can be programmed to generate from 1 to 64 dummy line clock periods between each frame in passive mode. the user should program vsw properly to ensure that enough waitstates occur between frames such that the lcd ? s dma is able to fully load the on-chip palette, as well as allowing a sufficient number of encoded pixel values to be input from the frame buffer, to be processed by the dither logic, and placed in the output fifo, ready to be output to the lcd ? s data pins. the number of waitstates required is system dependent. the factors that determine the number of waitstates include: palette buffer size (32 or 512 bytes), memory system speed (number of waitstates, burst speed, number of beats), and what value is programmed in the palette dma request delay (pdd) bit-field in lccr0. note that the line clock pin does transition during the insertion of the line clock waitstate periods.
11-36 sa-1110 developer ? s manual peripheral control module vsw does not affect generation of the frame clock signal in passive mode. passive lcd displays require that the frame clock is active on the rising edge of the first line clock pulse of each frame, with adequate setup and hold time. to meet this requirement, the lcd controller ? s frame clock pin is asserted on the rising edge of the first pixel clock for each frame. the frame clock remains asserted for the remainder of the first line as pixels are output to the display and it is then negated on the rising edge of the first pixel clock of the second line of each frame. 11.7.5.3 end-of-frame line clock wait count (efw) the 8-bit end-of-frame line clock wait count (efw) field is used in active mode (pas=1) to specify the number of line clocks to insert at the end of each frame. once a complete frame of pixels is transmitted to the lcd display, the value in efw is used to count the number of line clock periods to wait. after the count has elapsed, the vsync (l_fclk) signal is pulsed. efw generates a wait period ranging from 0 to 255 line clock cycles (setting efw=8 ? h00 disables the eof wait count). note that the line clock pin, l_lclk, does no t transition during the generation of the efw line clock periods. in passive mode, efw should be set to zero such that no end-of-frame waitstates are generated. vsw should be used exclusively in passive mode to insert line clock waitstates to allow the lcd ? s dma to fill the palette and process a number of pixels before the start of the next frame. 11.7.5.4 beginning-of-frame line clock wait count (bfw) the 8-bit beginning-of-frame line clock wait count (bfw) field is used in active mode (pas + 1) to specify the number of line clocks to insert at the beginning of each frame. the bfw count starts just after the vsync signal for the previous frame has been negated. after this has occurred, the value in bfw is used to count the number of line clock periods to insert before starting to output pixels in the next frame. bfw generates a wait period ranging from 0 to 255 extra line clock cycles (bfw=8 ? h00 disables the bof wait count). note that the line clock pin, l_lclk, do es transition during the generation of the bfw line clock wait periods. in passive mode, bfw should be set to zero such that no beginning-of-frame waitstates are generated. vsw should be used exclusively in passive mode to insert line clock waitstates to allow the lcd ? s dma to fill the palette and process a number of pixels before the start of the next frame.
sa-1110 developer ? s manual 11-37 peripheral control module the following table shows the location of the four bit fields located in lcd control register 2 (lccr2). the lcd controller must be disabled (len=0) when changing the state of any field within this register. 0h b010 0024 lccr2: lcd control register 2 read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 bfw efw vsw lpp reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 bits name description 9..0 lpp lines per panel. value (from 1 to 1024). used to specify number of lines per panel. for single-panel mode, this represents the total number of lines on the lcd display; for dual-panel mode, this represents half the number of lines on the whole lcd display. lines/panel = (lpp+1). 15..10 vsw vertical sync pulse width. in active mode (pas=1), value (from 1 to 64). used to specify number of line clock periods to pulse the l_fclk pin at the end of each frame after the end-of-frame wait (efw) period elapses. frame clock used as vsync signal in active mode. in passive mode (pas=0), value (from 1 to 64). used to specify number of extra line clock periods to insert after the end-of-frame. note that the width of l_fclk is not affected by vsw in passive mode and that line clock does not transition during the insertion of the extra line clock periods. also note that both efw and bfw should be set to zero in passive mode. vsync width = (vsw+1). 23..16 efw end-of-frame line clock wait count. in active mode (pas=1), value (from 0 to 255). used to specify number of line clock periods to add to the end of each frame. note that line clock does transition during the insertion of the extra line clock periods. efw should be cleared to zero (disabled) in passive mode. 31..24 bfw beginning-of-frame line clock wait count. in active mode (pas=1), value (from 0 to 255). used to specify number of line clock periods to add to the beginning of a frame before the first set of pixels is output to the display. note that line clock does transition during the insertion of the extra line clock periods. bfw should be cleared to zero (disabled) in passive mode.
11-38 sa-1110 developer ? s manual peripheral control module 11.7.6 lcd controller control register 3 lcd controller control register 3 (lccr3) contains seven different bit fields that are used to control various functions within the lcd controller. 11.7.6.1 pixel clock divider (pcd) the 8-bit pixel clock divider (pcd) field is used to select the frequency of the pixel clock. pcd can be any value from 1 to 225 (0 is illegal) and is used to generate a range of pixel clock frequencies from cclk/6 to cclk/514 (where cclk is the programmed frequency of the cpu clock). the pixel clock frequency should be adjusted to meet the required screen refresh rate. the refresh rate depends on: the number of pixels for the target display; whether single- or dual-panel mode is selected; whether monochrome or color mode is selected; the number of pixel clock waitstates programmed at the beginning and end of each line; the number of line clocks inserted at the beginning and end of each frame; the width of the vsync signal in active mode or vsw line clocks inserted in passive mode; and the width of the frame clock or hsync signal. all of these factors alter the time duration from one frame transmission to the next. different display manufacturers require different frame refresh rates depending on the physical characteristics of the display. pcd is used to alter the pixel clock frequency in order to meet these requirements. the frequency of the pixel clock for a set pcd value or the required pcd value to yield a target pixel clock frequency can be calculated using the two following equations. note that programming pcd = 8 ? h00 is illegal.: 11.7.6.2 ac bias pin frequency (acb) the 8-bit ac bias frequency (acb) field is used to specify the number of line clock periods to count between each toggle of the ac bias pin (l_bias). in passive mode, after the lcd controller is enabled, the value in acb is loaded to an 8-bit down counter and the counter begins to decrement using the line clock. when the counter reaches zero, it stops, the state of l_bias is reversed, and the whole procedure starts again. the number of line clocks between each ac bias pin transition ranges from 1 to 256. the user should program acb with the desired number of line clocks minus one. this pin is used by the lcd display to periodically reverse the polarity of the power supplied to the screen to eliminate dc offset. if the lcd display being controlled has its own internal means of switching its power supply, acb should be set to its maximum value to reduce power consumption (8 ? hff). note that the acb bit field has no effect on l_bias in active mode. because the pixel clock transitions continuously in active mode, the ac bias pin is used as an output enable signal. it is asserted automatically by the lcd controller in active mode whenever pixel data is driven out to the data pins to signal the display when it may latch pixels using the pixel clock. pixelclock cclk 2 pcd 2 + () ----------------------------- - = pcd cclk 2 pixelclock () ------------------------------------- 2 ? =
sa-1110 developer ? s manual 11-39 peripheral control module 11.7.6.3 ac bias pin transitions per interrupt (api) the 4-bit ac bias pin transitions per interrupt (api) field is used to specify the number of l_bias pin transitions to count before setting the ac bias count status (acs) bit in the lcd controller status register that signals an interrupt request. after the lcd controller is enabled, the value in api is loaded to a 4-bit down counter and the counter decrements each time the ac bias pin is inverted. when the counter reaches zero, it stops and the ac bias count (abc) bit is set in the status register. once abc is set, the 4-bit down counter is reloaded with the value in api, and is disabled until abc is cleared. when abc is cleared by the cpu, the down counter is enabled and again decrements each time the ac bias pin is inverted. the number of ac bias pin transitions between each interrupt request ranges from 0 to 15. note that programming api=4 ? h0 disables the ac bias pin transitions per interrupt function. in active mode, l_bias is used as an output enable signal. however, signalling of the api interrupt may still occur. the acb bit field can be used to count line clock pulses in active mode. when the programmed number of line clock pulses occurs, an internal signal is transitioned that is used to decrement the 4-bit counter used by the api interrupt logic. once this internal signal transitions the programmed number of times, as specified by api, an interrupt is generated. the user should program api to zero if the api interrupt function is not required in active mode (pas = 1). 11.7.6.4 vertical sync polarity (vsp) the vertical sync polarity (vsp) bit is used to select the active and inactive states of the vertical sync signal in active display mode (pas = 1), and the frame clock signal in passive display mode. when vsp=0, the l_fclk pin is active high and inactive low. when vsp=1, the l_fclk pin is active low and inactive high. in active display mode, the l_fclk pin is forced to its inactive state while pixels are transmitted during the frame. after the end of the frame and a programmable number of line clocks periods occur (controlled by efw), the l_fclk pin is forced to its active state for a programmable number of line clocks (controlled by vsw), and is then again forced to its inactive state. in passive display mode, the l_fclk pin is forced to its inactive state during the transmission of the second line of each frame through to the end of the frame. frame clock is then forced to its active state on the rising edge of the first pixel clock of each frame. frame clock remains active during the transmission of the entire first line of pixels in the frame and is then forced back to its inactive state on the rising edge of the first pixel clock of the second line of the frame. 11.7.6.5 horizontal sync polarity (hsp) the horizontal sync polarity (hsp) bit is used to select the active and inactive states of the horizontal sync signal in active display mode, and the line clock signal in passive display mode. when hsp=0, the l_lclk pin is active high and inactive low. when hsp=1, the l_lclk pin is active low and inactive high. both in active and passive display modes, the l_fclk pin is forced to its inactive state whenever pixels are transmitted after the end of each line and a programmable number of pixel clock periods occur (controlled by elw), the l_fclk pin is forced to its active state for a programmable number of line clocks (controlled by hsw), and is then again forced to its inactive state. 11.7.6.6 pixel clock polarity (pcp) the pixel clock polarity (pcp) bit is used to select which edge of the pixel clock data is driven out onto the lcd ? s data pins. when pcp=0, data is driven onto the lcd ? s data pins on the rising edge of the l_pclk pin. when pcp=1, data is driven onto the lcd ? s data pins on the falling edge of the l_pclk pin.
11-40 sa-1110 developer ? s manual peripheral control module 11.7.6.7 output enable polarity (oep) the output enable polarity (oep) bit is used to select the active and inactive states of the output enable signal in active display mode. in this mode, the ac bias pin is used as an enable that signals the off-chip device when data is actively being driven out using the pixel clock. the pixel clock continuously toggles during operation of active mode (pas=1). when oep=0, the l_bias pin is active high and inactive low. when oep=1, the l_bias pin is active low and inactive high. in active display mode, data is driven onto the lcd ? s data pins on the programmed edge of the l_pclk pin when l_bias is in its active state. note that oep does not affect l_bias in passive display mode. the following table shows the location of the seven different bit fields located in lcd controller control register 3 (lccr3). the lcd controller must be disabled (len=0) when changing the state of any field within this register. note that writes to reserved bits are ignored and reads return zeros. 0h b010 0028 lccr3: lcd control register 3 read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved oep pcp hsp vsp api acb pcd reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (sheet 1 of 2) bits name description 7..0 pcd pixel clock divisor. value (from 0 to 255). used to specify the frequency of the pixel clock based on the cpu clock (cclk) frequency. pixel clock frequency can range from cclk/6 to cclk/514. pixel clock frequency = cclk/2(pcd+2). note that pcd must be programmed with a value of 1 or greater (pcd = 8 ? h00 is illegal). 15..8 acb ac bias pin frequency. value (from 1 to 256). used to specify the number of line clocks to count before transitioning the ac bias pin in passive mode (pas=0). this pin is used to periodically invert the polarity of the power supply to prevent dc charge buildup within the display. if the passive display that is being controlled does not need to use l_bias, the user should program acb to its maximum value (8 ? hff) to conserve power. note that acb is ignored in active mode (pas = 1). number of line clocks/toggle of the l_bias pin = (acb+1). 19..16 api ac bias pin transitions per interrupt. value (from 0 to 15). used to specify the number of ac bias pin transitions to count before setting the line count status (abc) bit, signalling an interrupt request. counter frozen when abc is set and is restarted when abc is cleared by software. this function is disabled when api=4 ? h0. 20 vsp vertical sync polarity. 0 ? l_fclk pin is active high and inactive low. 1 ? l_fclk pin is active low and inactive high. active mode: vertical sync pulse active between frames, after end-of-frame wait period. passive mode: frame clock active during first line of each frame. 21 hsp horizontal sync polarity. 0 ? l_lclk pin is active high and inactive low. 1 ? l_lclk pin is active low and inactive high. active and passive mode: horizontal sync pulse/line clock active between lines, after end-of-line wait period.
sa-1110 developer ? s manual 11-41 peripheral control module 11.7.7 lcd controller dma registers the lcd controller has two fully independent dma channels used to transfer frame buffer data for each frame displayed from off-chip memory to the lcd ? s palette ram and the input fifo. dma channel 1 is used for single-panel display mode and the upper screen in dual-panel mode. dma channel 2 is used exclusively for the lower screen in dual-panel mode. both dma channels contain a base address pointer and current address pointer register. the lcd ? s dma engine has the highest priority to gain mastership of the sa-1110 ? s internal arm system bus. the lcd is given highest priority to prevent other masters from starving the lcd screen (including the cpu). the two dma channels use a separate set of base address and current address pointers. the user must initialize the base address pointer registers before enabling the lcd. once enabled, the base address is transferred to the current address pointer. after the lcd is enabled, the input fifo requests a dma transfer and the dma makes a 4-word burst access from off-chip memory using the address contained within the current address pointer. the pointer is incremented by 4 (bytes) each time a word is read from memory (bit 2 of the pointer is incremented). each of the 4 words from the burst is loaded into the top of the input fifo. the lcd then takes one value at a time from the bottom of the fifo, unpacks it into individual encoded pixel values, and uses the values to index into the palette. each time the input fifo contains four empty entries, another dma request is made and another 4-word burst is performed. to calculate the frame buffer end address, the dma controller uses the values programmed in the pixels per line (ppl), lines per panel (lpp), single/dual screen select (sds), color/monochrome select (cms) bit fields, and double pixel data (dpd) bit fields within the control registers as well as the pixel bit size (pbs) field contained within the first entry of the palette buffer from the off-chip frame buffer. when the current address pointer reaches the calculated end of buffer address, the value in the base address pointer is again transferred to the current address pointer. 22 pcp pixel clock polarity. 0 ? data is driven on the lcd ? s data pins on the rising edge of l_pclk. 1 ? data is driven on the lcd ? s data pins on the falling edge of l_pclk. 23 oep output enable polarity. 0 ? l_bias pin is active high and inactive low in active display mode and parallel data input mode. 1 ? l_bias pin is active low and inactive high in active display mode and parallel data input mode. in active display mode, data is driven out to the lcd ? s data pins on programmed pixel clock edge when ac bias pin is active. note that oep is ignored in passive display mode. 31..24 ? reserved. 0h b010 0028 lccr3: lcd control register 3 read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved oep pcp hsp vsp api acb pcd reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (sheet 2 of 2) bits name description
11-42 sa-1110 developer ? s manual peripheral control module 11.7.8 dma channel 1 base address register dma channel 1 base address register (dbar1) is a 32-bit register that is used to specify the base address of the off-chip frame buffer for dma channel 1. the base address pointer register can be both read and written. addresses programmed in the base address register must be aligned on quadword boundaries; the least significant four bits (dbar1 3:0) must always be written with zeros. the user must initialize the base address register before enabling the lcd, and can also write a new value to it while the lcd is enabled to allow a new frame buffer to be used for the next frame. the user can change the state of dbar1 while the lcd controller is active just after the base address update (bau) status bit is set with the lcd ? s status register, which generates an interrupt request. this status bit indicates that the value in the base address pointer has transferred to the current address pointer register and that it is safe to write a new base address value. dma channel 1 is used to transfer frame buffer data from off-chip memory to the lcd ? s input fifo and the palette ram for single-panel mode, and for the top half of the screen in dual-panel mode. for dual-panel operation, the user must perform the following sequence in order: disable the lcd (len=0), program dual panel mode (sds= 0 1), write the upper panel dma base address, write the lower panel dma base address, enable the lcd (len= 0 1) . note that dbar1 is not reset and must be initialized before enabling the lcd; question marks indicate that the values are unknown at reset. note: a question mark (?) signifies that the reset value of that bit is undefined when the processor has completed its reset cycle. 0h b010 0010 dbar1: dma channel 1 base address register read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 dma channel 1 base address pointer reset ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? bits name description 31..0 dbar1 dma channel 1 base address pointer. used to specify the base address of the frame buffer within off-chip memory. value in dbar1 is transferred to current address pointer register 1 when lcd is first enabled (len= 0 1) and when the current address pointer value equals the end-of-frame buffer. dbar1 should be written only when the lcd is disabled or immediately after an interrupt is generated by the setting of the base address update (bau) status bit. the base address must be on a quadword boundary; the user must always write bits 0 through 3 to zero.
sa-1110 developer ? s manual 11-43 peripheral control module 11.7.9 dma channel 1 current address register dma channel 1 current address register (dcar1) is a 32-bit read-only register that is used by dma channel 1 to keep track of the address of the dma transfer currently in progress or the address of the next dma transfer. any time the lcd is first enabled (len= 0 1) or the value in the current address pointer register equals the calculated end address value, the contents of the base address pointer register is transferred to the current address pointer. this register can be read to determine the approximate line that the lcd controller is currently processing and driving out to the display. it is also useful to read this register just before writing the dma ? s base address pointer to ensure that the end of frame is not about to occur, which means that the base address pointer is about to be transferred to the current address pointer. note that dcar1 is a read-only register that is not reset and is not initialized until the lcd is first enabled, causing the contents of the base address register to be transferred to it; question marks indicate that the values are unknown at reset. note: a question mark (?) signifies that the reset value of that bit is undefined when the processor has completed its reset cycle. 0h b010 0014 dcar1: dma channel 1 current address register read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 dma channel 1 current address pointer reset ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? bits name description 31..0 dcar1 dma channel 1 current address pointer. read-only register. continuously reflects the current address that dma channel 1 is transferring from or will use in the next transfer. base address register is transferred to this register whenever the lcd is enabled (len= 0 1) and when the current address is equal to the calculated end address of the buffer.
11-44 sa-1110 developer ? s manual peripheral control module 11.7.10 dma channel 2 base and current address registers dma channel 2 ? s base and current address registers (dbar2 and dcar2) function exactly like dma channel 1 ? s except that they are used exclusively for dual-panel operation. (see the preceding sections.) when sds=1, dma channel 2 is used to supply frame buffer data to the lower half of the display. note that the palette buffer, which resides within the first 16 or 256 entries of the frame buffer, is utilized only by dma channel 1. the user should not place palette entries into the frame buffer for dma channel 2. the base address for channel 2 points to the first encoded pixel values for the lower half of the display. for dual-panel operation, the user must perform the following sequence in order: disable the lcd (len=0), program dual-panel mode (sds= 0 1), write the upper panel dma base address, write the lower dma base address and enable the lcd (len= 0 1). the following figures show the format of these registers; question marks indicate that the values are unknown at reset. note: a question mark (?) signifies that the reset value of that bit is undefined when the processor has completed its reset cycle. 0h b010 0018 dbar2: dma channel 2 base address register read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 dma channel 2 base address pointer reset ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? bits name description 31..0 dbar2 dma channel 2 base address pointer. used to specify the base address of the frame buffer within off-chip memory for the lower half of the display in dual-panel operation. value in dbar2 is transferred to current address pointer register 2 when lcd is first enabled (len= 0 1) and when the current address pointer value reaches the end-of-frame buffer. dbar2 should be written only when the lcd is disabled or immediately after an interrupt is generated by setting the base address update status (bau) bit. the base address must be on a quadword boundary. the user must always write bits 0 through 3 to zero. 0h b010 001c dcar2: dma channel 2 current address register read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 dma channel 2 current address pointer reset ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? bits name description 31..0 dcar2 dma channel 2 current address pointer. read-only register. continuously reflects the current address that dma channel 2 is transferring from or will use in the next transfer. base address register is transferred to this register whenever the lcd is first enabled and when the current address is equal to the calculated end address of the buffer.
sa-1110 developer ? s manual 11-45 peripheral control module 11.7.11 lcd controller status register the lcd controller status register (lcsr) contains bits that signal overrun and underrun errors for both the input and output fifos, ac bias pin transition count, lcd disabled, dma base update ready, and dma transfer bus error conditions. each of these hardware-detected events signal an interrupt request to the interrupt controller. each of the lcd ? s status bits signal an interrupt request as long as the bit is set. once the bit is cleared, the interrupt is cleared. read/write bits are called status bits (read-only bits are called flags). status bits are referred to as ? sticky ? (once set by hardware, they must be cleared by software). writing a one to a sticky status bit clears it; writing a zero has no effect. read-only flags are set and cleared by hardware; writes have no effect. the user has the ability to mask all lcd interrupts by clearing bit 12 within the interrupt controller mask register (icmr). see the section 9.2, ? interrupt controller ? on page 9-11 . 11.7.11.1 lcd disable done flag (ldd) (read/write, maskable interrupt) the lcd disable done flag (ldd) is set after the lcd has been disabled and the frame that is active finishes being output to the lcd ? s data pins. when the lcd is disabled by clearing the lcd enable bit (len= 0 1) in lccr0, the lcd allows the current frame to complete before it is disabled. after the last set of pixels is clocked out onto the lcd ? s data pins by the pixel clock, the lcd is disabled, ldd is set, and an interrupt request is made to the interrupt controller if it is unmasked (ldm=0). this interrupt is useful to allow an orderly shutdown of the lcd controller before the user places the sa-1110 into sleep mode. 11.7.11.2 base address update flag (bau) (read-only, maskable interrupt) the base address update flag (bau) is a read-only bit that is set after the contents of the dma base address register 1 are transferred to the dma current address register 1 and is cleared when dma base address register 1 is written. the value in the base address register is transferred to the current address register when the lcd is first enabled by writing a one to len (len= 0 1) and when the current address pointer equals the end address value calculated by the lcd controller. when bau is set, an interrupt request is made to the interrupt controller if it is unmasked (bam = 0). this interrupt allows the user to program the dma with a new base address value to alternate between two or more frame buffer locations. when dual-panel mode is enabled (sds=1), both dma channels are enabled, and bau is set only after both channels ? base address registers are transferred to their corresponding current address registers (1 and 2) and is cleared when dma base address register 2 (lower panel) is written. therefore, the user must always update the dma base address register 1 (upper panel) first in dual-panel mode. 11.7.11.3 bus error status (ber) (read/write, maskable interrupt) the bus error status (ber) bit is set when a dma transfer causes a bus error to occur on the arm system bus. a bus error is signalled when the dma controller attempts to access a reserved or nonexistent memory space. when this occurs, the sa-1110 ? s memory controller returns zeros for the read. it asserts the bus error signal to the lcd ? s dma, which in turn, causes the ber bit to be set and an interrupt request is made to the interrupt controller if it is unmasked (erm = 0). the dma is not disabled as a result of the bus error and operation continues as normal. if a dma access causes a bus error, zeros are returned by the memory controller, which causes a palette entry to be filled with zeros (highest intensity color or black), or if pixel data is being dmaed, the lcd accesses the first location of the palette ram one or more times.
11-46 sa-1110 developer ? s manual peripheral control module 11.7.11.4 ac bias count status (abc) (read/write, nonmaskable interrupt) the ac bias count status (abc) bit it set each time the ac bias pin (l_bias) transitions a particular number of times as specified by the ac bias pin transitions per interrupt (api) field in lccr3. if api is programmed with a nonzero value, a counter is loaded with the value in api and is decremented each time the l_bias pin reverses state. when the counter reaches zero, the abc bit is set, which signals an interrupt request to the interrupt controller. the counter reloads using the value in api, but does not start to decrement again until abc is cleared by the user. 11.7.11.5 input fifo overrun lower panel status (iol) (read/write, maskable interrupt) the input fifo overrun lower panel status (iol) bit is set when the lcd ? s dma channel 2 attempts to place data into the lower panel ? s input fifo after it has been completely filled. it is cleared by writing a one to the bit. this bit is used only in dual-panel mode (sds=1). when this bit is set, an interrupt request is made to the interrupt controller if it is unmasked (erm=0). 11.7.11.6 input fifo underrun lower panel status (iul) (read/write, maskable interrupt) the input fifo underrun lower panel status (iul) bit is set when the lower panel ? s input fifo is completely empty and the lcd ? s pixel unpacking logic attempts to fetch data from the fifo. it is cleared by writing a one to the bit. this bit is used only in dual-panel mode (sds=1). when this bit is set, an interrupt request is made to the interrupt controller if it is unmasked (erm=0). 11.7.11.7 input fifo overrun upper panel status (iou) (read/write, maskable interrupt) the input fifo overrun upper panel status (iou) bit is set when the lcd ? s dma channel 1 attempts to place data into the upper panel ? s input fifo after it has been completely filled. it is cleared by writing a one to the bit. this bit is used in single-panel mode (sds=0) and dual-panel mode (sds=1). when this bit is set, an interrupt request is made to the interrupt controller if it is unmasked (erm=0). 11.7.11.8 input fifo underrun upper panel status (iuu) (read/write, maskable interrupt) the input fifo underrun upper panel status (iuu) bit is set when the upper panel ? s input fifo is completely empty and the lcd ? s pixel unpacking logic attempts to fetch data from the fifo. it is cleared by writing a one to the bit. this bit is used in single-panel mode (sds=0) and dual-panel mode (sds=1). when this bit is set, an interrupt request is made to the interrupt controller if it is unmasked (erm=0). 11.7.11.9 output fifo overrun lower panel status (ool) (read/write, maskable interrupt) the output fifo overrun lower panel status (ool) bit is set when the lcd ? s dither logic attempts to place data into the lower panel ? s output fifo after it has been completely filled. it is cleared by writing a one to the bit. this bit is used only in dual-panel mode (sds=1). when this bit is set, an interrupt request is made to the interrupt controller if it is unmasked (erm = 0).
sa-1110 developer ? s manual 11-47 peripheral control module 11.7.11.10 output fifo underrun lower panel status (oul) (read/write, maskable interrupt) the output fifo underrun lower panel status (oul) bit is set when the lower panel ? s output fifo is completely empty and the lcd ? s data pin driver logic attempts to fetch data from the fifo. it is cleared by writing a one to the bit. this bit is used only in dual-panel mode (sds=1). when this bit is set, an interrupt request is made to the interrupt controller if it is unmasked (erm=0). 11.7.11.11 output fifo overrun upper panel status (oou) (read/write, maskable interrupt) the output fifo overrun upper panel status (oou) bit is set when the lcd ? s dither logic attempts to place data into the upper panel ? s output fifo after it has been completely filled. it is cleared by writing a one to the bit. this bit is used in single-panel mode (sds=0) and dual-panel mode (sds=1). when this bit is set, an interrupt request is made to the interrupt controller if it is unmasked (erm=0). 11.7.11.12 output fifo underrun upper panel status (ouu) (read/write, maskable interrupt) the output fifo underrun upper panel status (ouu) bit is set when the upper panel ? s output fifo is completely empty and the lcd ? s data pin driver logic attempts to fetch data from the fifo. it is cleared by writing a one to the bit. this bit is used in single-panel mode (sds=0) and dual-panel mode (sds=1). when this bit is set, an interrupt request is made to the interrupt controller if it is unmasked (erm=0). the following table shows the location of the status and flag bits in lcsr. for reserved bits, writes are ignored and reads return zero. set status bits should be cleared by software before enabling both the lcd controller and interrupt controller. 0h b010 0004 lcsr: lcd status register read/write and read-only 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved ouu oou oul ool iuu iou iul iol abc ber bau lfd reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 (sheet 1 of 2) bits name description 0ldd lcd disable done flag. 0 ? lcd has not been disabled and the last active frame completed. 1 ? lcd has been disabled and the last active frame has just completed. 1bau base address update flag (read-only). 0 ? base address has been written and has not yet been transferred to the current address register. 1 ? base address has been transferred to the current address register, triggered either by enabling the lcd or when the current address pointer equals the end address value calculated by the lcd. 2ber bus error status. 0 ? dma has not attempted an access to reserved/nonexistent memory space. 1 ? dma has attempted an access to a reserved/nonexistent location in external memory. the errant dma read returns zeros.
11-48 sa-1110 developer ? s manual peripheral control module 3abc ac bias count status. 0 ? ac bias transition counter has not decremented to zero, or api is programmed to all zeros. 1 ? ac bias transition counter has decremented to zero, indicating that the l_bias pin has transitioned the number of times specified by the api control bit field. counter is reloaded with the value in api but is disabled until the user clears abc. 4iol input fifo overrun lower panel status. 0 ? input fifo for the lower panel display has not overrun. 1 ? dma attempted to place data into the input fifo for the lower panel after it has been filled. 5iul input fifo underrun lower panel status. 0 ? input fifo for the lower panel display has not underrun. 1 ? dma not supplying data to input fifo for the lower panel at a sufficient rate. fifo has completely emptied; pixel unpacking logic has attempted to take added data from the fifo. 6 iou input fifo overrun upper panel status. 0 - input fifo for the upper or whole panel display has not overrun. 1 - dma attempted to place data into the input fifo for the upper or whole panel after it has been filled. 7iuu input fifo underrun upper panel status. 0 ? input fifo for the upper or whole panel display has not underrun. 1 ? dma not supplying data to input fifo for the upper or whole panel at a sufficient rate. fifo has completely emptied; pixel unpacking logic has attempted to take added data from the fifo. 8 ool output fifo overrun lower panel status. 0 ? output fifo for the lower panel display has not overrun. 1 ? dither logic attempted to place data into the output fifo for the lower panel after it had been filled. 9oul output fifo underrun lower panel status. 0 ? output fifo for the lower panel display has not underrun. 1 ? lcd dither logic not supplying data to output fifo for the lower panel at a sufficient rate. fifo has completely emptied and data pin driver logic has attempted to take added data from the fifo. 10 oou output fifo overrun upper panel status. 0 ? output fifo for the upper or whole panel display has not overrun. 1 ? dither logic attempted to place data into the output fifo for the upper or whole panel after it had been filled. 11 ouu output fifo underrun upper panel status. 0 ? output fifo for the upper or whole panel display has not underrun. 1 ? lcd dither logic not supplying data to output fifo for the upper or whole panel at a sufficient rate. fifo has completely emptied and data pin driver logic has attempted to take added data from the fifo. 31..12 ? reserved. 0h b010 0004 lcsr: lcd status register read/write and read-only 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved ouu oou oul ool iuu iou iul iol abc ber bau lfd reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 (sheet 2 of 2) bits name description
sa-1110 developer ? s manual 11-49 peripheral control module 11.7.12 lcd controller register locations table 11-9 shows the registers associated with the lcd controller and the physical addresses used to access them. figure 11-32 to figure 11-36 describe the lcd controller timing parameters. table 11-9. lcd controller control, dma, and status register locations address name description 0hb010 0000 lccr0 lcd controller control register 0 0hb010 0004 lcsr lcd controller status register 1 0hb010 0008 ? 0h b010 000c ? reserved 0hb010 0010 dbar1 dma channel 1 base address register 0hb010 0014 dcar1 dma channel 1 current address register 0hb010 0018 dbar2 dma channel 2 base address register 0hb010 001c dcar2 dma channel 2 current address register 0hb010 0020 lccr1 lcd controller control register 1 0hb010 0024 lccr2 lcd controller control register 2 0hb010 0028 lccr3 lcd controller control register 3 0hb010 002c ? 0hb010 ffff ? reserved
11-50 sa-1110 developer ? s manual peripheral control module 11.7.13 lcd controller pin timing diagrams figure 11-10. passive mode beginning-of-frame timing a4790-01 l_fclk l_lclk l_pclk ldd[x:0] notes: len - lcd enable: 0 - lcd is disabled. 1 - lcd is enabled. vsp - vertical sync polarity: 0 - frame clock is active high, inactive low. 1 - frame clock is active low, inactive high. vsw - vertical sync pulse width: 1 to 64 horizontal sync clock periods to assert the vertical sync signal (hsync transitions). hsp - horizontal sync polarity: 0 - line clock is active high, inactive low. 1 - line clock is active low, inactive high. elw - end-of-line pixel clock wait count: 1 to 256 "dummy" pixel clock periods to wait after last pixel in line before asserting line clock (pixel clock does not transition). blw - beginning-of-line pixel clock wait count: 1 to 256 "dummy" pixel clock periods to wait after line clock negated before asserting pixel clocks (pixel clock does not transition). hsw - horizontal sync pulse width: 0 to 64 "dummy" pixel clock periods to assert the line clock (pixel clock does not transition). ppl - pixels per line: 16 to 1024 pixels per line on the screen (must be programmed on 16 pixel multiples). frame clock asserted on first pixel clock of each frame, and is negated one "dummy" pixel clock period before the first pixel clock of the 2nd line. len set to 1 hsp = 0 vsp = 0 vsw = 1 ppl = 16 elw = 2 hsw = 6 blw = 2 line 0 data line 1 data line 2 data
sa-1110 developer ? s manual 11-51 peripheral control module figure 11-11. passive mode end-of-frame timing a4791-01 l_fclk l_lclk l_pclk ldd[x:0] notes: blw - beginning-of-line pixel clock wait count: 0 to 256 "dummy" pixel clock periods to wait after line clock is negated before asserting pixel clocks (pixel clock does not transition). vsw - vertical sync pulse width: in passive mode, 1 to 64 line clock periods to wait between the end of one frame and the beginning of the next frame (line clock transitions). elw - end-of-line pixel clock wait count: 1 to 256 "dummy" pixel clock periods to wait after last pixel in line before asserting line clock (pixel clock does not transition). lpp - lines per panel: 1 to 1024 lines per panel. line 479 data line 0 data lpp = 480 vsw = 2 blw = 1 elw = 1
11-52 sa-1110 developer ? s manual peripheral control module figure 11-12. passive mode pixel clock and data pin timing a8100-01 l_fclk l_lclk l_pclk ldd[3:0]* *dpd = 0 notes: pcp - pixel clock polarity: 0 - pixels driven from data pins on rising edge of pixel clock. 1 - pixels driven from data pins on falling edge of pixel clock. dpd - dual pixel data mode: 0 - 4 data pins are used in single-panel monochrome mode. 1 - 8 data pins are used in single-panel monochrome mode. pixels 0 through 3 pcp = 1 data pins change data pins sampled by the display pixels 4 through 7 pixels 8 through 11 pixels 12 through 15
sa-1110 developer ? s manual 11-53 peripheral control module figure 11-13. active mode timing a4793-01 l_fclk (vsync) l_lclk (hsync) l_bias (oe) l_pclk ldd[7:0], gpio[9:2] notes: len - lcd enable: 0 - lcd is disabled. 1 - lcd is enabled. vsp - vertical sync polarity: 0 - vertical sync clock is active high, inactive low. 1 - vertical sync clock is active low, inactive high. vsw - vertical sync width: 1 to 64 horizontal sync clock periods to assert the vertical sync signal (hsync transitions). hsw - horizontal sync pulse width: 1 to 64 pixel clock periods to assert the line clock (pixel clock transitions). hsp - horizontal sync polarity: 0 - horizontal sync clock is active high, inactive low. 1 - horizontal sync clock is active low, inactive high. bfw - beginning-of-frame horizontal sync clock wait count: 0 to 255 horizontal sync clock periods to wait at the beginning of each frame (hsync transitions). blw - beginning-of-line pixel clock wait count: 1 to 256 pixel clock periods to wait after line clock negated before asserting pixel clocks (pixel clock transitions). elw - end-of-line pixel clock wait count: 1 to 256 pixel clock periods to wait after last pixel in line before asserting line clock (pixel clock transitions). ppl - pixels per line: 1 to 1024 pixels per line on screen. line 1 data line 0 data ppl = 16 hsp = 0 vsp = 0 vsw = 0 bfw = 1 elw = 1 bfw = 2 blw = 1 hsw = 4 len set to 1
11-54 sa-1110 developer ? s manual peripheral control module figure 11-14. active mode pixel clock and data pin timing a8099-01 l_fclk (vsync) l_bias oe) l_lclk (hsync) l_pclk ldd[7:0], gpio[9:2] notes: pcp - pixel clock polarity: 0 - pixels driven from data pins on rising edge of pixel clock. 1 - pixels driven from data pins on falling edge of pixel clock. pixel 0 pixel 2 pixel 3 pixel 1 data pins change pcp = 1 data pins sampled by the display
sa-1110 developer ? s manual 11-55 peripheral control module 11.8 serial port 0 ? usb device controller this section describes the implementation-specific options of the usb protocol for a device controller as it applies to serial port 0, such as number, type, and function of the endpoints, interrupts to the cpu, transmit/receive fifo interface, and so on. it is assumed that the user has a working knowledge of the usb standard. the udc is usb-compliant and supports all standard device requests issued by the host. for programmer convenience, summaries of udc operation are provided as well as quick reference tables. however, the user should refer to the universal serial bus specification , revision 1.0 1 for a full description of the usb protocol and its operation. serial port 0 is a universal serial bus device controller (udc) that supports three endpoints and can operate half-duplex at a baud rate of 12 mbps (slave only, not a host or hub controller). the serial information transmitted by the udc contains layers of communication protocols, the most basic of which are fields. udc fields include: sync, packet identifier, address, endpoint, frame number, data, and crc fields. fields are used to produce packets. depending on the function of a packet, a different combination and number of fields are used. packet types include: token, start of frame, data, and handshake packets. packets are then assembled into groups to produce frames. these frames or transactions fall into four groups: bulk, control, interrupt, and isochronous. (the udc supports only bulk and control.) endpoint 0, by default, is used only to communicate control transactions to configure the udc after it is reset or hooked up (physically connected to an active usb host or hub). endpoint 0 ? s responsibilities include: connection, address assignment, endpoint configuration, bus enumeration, and disconnect. endpoint 1 is used to perform bulk out data transactions and receiving data from the usb host; endpoint 2 is used to perform bulk in data transactions and transmitting data to the usb host. the udc uses two separate fifos to buffer incoming and outgoing data to or from the host (16-entry x 8-bit for transmitting, and 20-entry x 8-bit for receiving). the fifos can be filled or emptied either by the dma or the cpu, with service requests being signalled when either fifo is half-full or empty. interrupts are signalled when the receive fifo experiences an overrun and the transmit fifo experiences an underrun. the control endpoint 0 has an additional 8-entry x 8-bit fifo that can only be read or written by processor reads and writes. the external pins dedicated to this interface are udc+ and udc-. the usb protocol uses differential signalling between the two pins for half-duplex data transmission. a 1.5-kohm pull-up resistor is required to be connected to the usb cable ? s d+ signal to pull the udc+ pin high when not driven. this signifies the udc is a high-speed, 12-mbps device and provides the correct polarity for data transmission. using differential signalling allows multiple states to be transmitted on the serial bus. these states are combined to transmit data as well as various bus conditions, including: idle, resume, start of packet, end of packet, disconnect, connect, and reset. 1. the latest revision of the universal serial bus specification revision 1.0 can be accessed via the world wide web internet site at: http://www.teleport.com/~usb/
11-56 sa-1110 developer ? s manual peripheral control module 11.8.1 usb operation following a reset of the sa-1110 or whenever the udc is attached to a usb bus, all endpoints are automatically configured by the udc and the udc is forced to use the usb default address of zero. the host then assigns the udc a unique address. at this point, the udc is under the host ? s control and responds to its commands that are transmitted to endpoint 0 using control transactions. endpoint 1 is used to perform bulk out data transactions, receiving data from the usb host, and endpoint 2 bulk in data transactions, transmitting data to the usb host. the following table defines the udc control register (udccr). note: the device that the sa-1110 is implemented in cannot be powered by the usb cable alone. a bus ? powered device model does not function in this instance because when the host sends a suspend signal, the device is required to consume less than 500ua as per section 7.2.3 of the usb specification, version 1.1. the device cannot limit its current consumption to 500ua unless it enters sleep mode. when the device enters sleep mode, all udc registers in the sa-1110 are reset and will not respond to a host ? assigned address. the following sections provide details of the usb protocol in a bottom-up fashion starting with signalling levels. 11.8.1.1 signalling levels usb uses differential signalling to encode data and to communicate various bus conditions. the usb specification refers to the j and k data states to differentiate between high- and low-speed transmission. because the udc supports only 12-mbps transmission, references are made only to actual data state 0 and actual data state 1. four distinct states are represented using differential data by decoding the polarity of the udc+ and udc- pins. two of the four states are used to represent data. a one is represented when udc+ is high and udc- is low; a zero is represented when udc+ is low and udc- is high. the remaining two states and pairings of the four encodings are further decoded to represent the current state of the usb bus. table 11-10 shows how seven different bus states are represented using differential signalling. hosts and hubs have pull-down resistors on both the d+ and d- lines. when a device is not attached to the cable, the pull-down resistors cause d+ and d- to be pulled down below the single-ended low threshold of the host or hub. this creates a state called single-ended zero (se0). a disconnect is table 11-10. usb bus states bus state udc+/udc- pin levels idle udc+ high, udc- low (same as a 1). resume udc+ low, udc- high (same as a 0). start of packet transition from idle to resume. end of packet udc+ and udc- low for 2-bit times followed by an idle for 1-bit time. disconnect udc+ and udc- below single-ended low threshold for more than 2.5 s. (disconnect is the static bus condition that results when no device is plugged into a hub port.) connect udc+ or udc- high for more than 2.5 s. reset udc+ and udc- low for more than 2.5 s. (reset is driven by the host controller and sensed by a device controller.)
sa-1110 developer ? s manual 11-57 peripheral control module detected by the host when an se0 persists for more than 2.5 s (30-bit times). when the udc is connected to the usb cable, the pull-up resistor on the udc+ pin causes d+ to be pulled above the single-ended high threshold level. after 2.5 s elapse, the host detects a connect. after this point, the bus is in the idle state because udc+ is high and udc- is low. a start of packet is signalled by transitioning the bus from the idle to the resume state (a 1 to 0 transition). the beginning of each usb packet begins with a sync field, which starts with the 1-to-0 transition (see the section 11.8.1.1, ? signalling levels ? on page 11-56 ). after the packet data has been transferred, an end of packet is signalled by pulling both udc+ and udc- low for 2-bit times, followed by an idle for 1-bit time. if the idle persists for more than 3 ms, the udc enters suspend mode and it is placed in low-power mode. the udc can be awakened from the suspend state by the host by switching the bus to the resume state via normal bus activity, or by signalling a reset. under normal operating conditions, the host ensures that devices do not enter the suspend state by periodically signalling an end of packet (eop). 11.8.1.2 connecting the usb to the sa-1110 the following diagram shows how the usb device is connected to the sa-1110. caution: it is important to note that you never put the sa-1110 to sleep while the usb cable is connected to the device. during sleep, the udc registers are reset, and after sleep, the device will not respond to its host-assigned address. figure 11-15. connecting the usb to the sa-1110 a8036-01 intel ? strongarm* sa-1110 processor universal serial bus usb gnd udc ? udc+ usb 5v udc ? udc+ gpion 470k 1.5k 470k 5v to 3.3v
11-58 sa-1110 developer ? s manual peripheral control module 11.8.1.3 bit encoding the usb uses nonreturn ? to ? zero inverted (nrzi) to encode individual bits. both the clock and the data are encoded and transmitted within the same signal. instead of representing data by controlling the state of the signal, transitions are used. a zero is represented by a transition, and a one is represented by no transition (this produces the data). each time a zero occurs, the receiver logic synchronized the baud clock to the incoming data (this produces the clock). to ensure the receiver is periodically synchronized, any time six consecutive ones are detected in the serial bit stream, a zero is automatically inserted by the transmitter. this procedure is known as ? bit stuffing ? . the receiver logic, in turn, automatically detects stuffed bits and removes them from the incoming data. bit stuffing causes a transition on the incoming signal at least once every seven bit-times to guarantee baud clock lock. bit stuffing is enabled for an entire packet beginning when the start of packet is detected until the end of packet is detected (enabled during the sync field all the way through the crc field). figure 11-16 shows the nrzi encoding of the data byte 0b1101 0010. figure 11-16. nrzi bit encoding example a4795-01 bit value digital data nrzi data 1 1 010010
sa-1110 developer ? s manual 11-59 peripheral control module 11.8.1.4 field formats individual bits are assembled into groups called fields. fields are used to construct packets and packets are used to construct frames or transactions. the seven usb field types include: sync, packet identifier, address, endpoint, frame number, data, and crc fields. a sync is preceded by the idle state on the usb bus and is always the first field of every packet. the first bit of a sync field signals the start of packet (sop) to the udc or host. a sync is 8 bits wide and consists of seven zeros followed by a one (0x80). the packet identifier (pid) is 1 byte wide and always follows the sync field. the first 4 bits contain an encoded value that represents packet type (token, data, handshake, special), packet format, and type of error detection. the last four bits contain a check field that ensures the pid is transmitted without errors. the check field is generated by performing a ones complement of the pid. the udc automatically xors the pid and check field and takes the appropriate action (as prescribed by the usb standard) if the result does not contain all ones, indicating an error has occurred in transmission. the udc ? s three endpoints are accessed using the address and endpoint fields. the address field contains 7 bits and permits 128 unique devices to be placed on the usb. after the sa-1110 is reset, or a reset is signalled via the usb bus, the udc (and all other 127 possible devices) is assigned the default address of zero. the host is then responsible for assigning unique addresses for each device on the bus. this is performed in the enumeration process one device at a time. once the host assigns the udc an address, it responds only to transactions addressed to it. the address field is transmitted in every packet and follows the pid field. when the udc detects that a packet is addressed to it, the endpoint field is used to determine which of the udc ? s three endpoints are being addressed. the endpoint field is 4 bits. however, only the encodings for endpoints 0 through 2 are allowed. the endpoint field follows the address field. table 11-11 shows the valid values for the endpoint field. . the frame number is an 11-bit field that is incremented by the host each time a frame is transmitted. when it reaches its maximum value of 2047 (0x7ff), it rolls over. it is transmitted in the start of frame (sof) packet, which is output by the host in 1 ms intervals. the frame number field is used only by device controllers to control isochronous transfers, and therefore, does not affect the udc. data fields are used to transmit the bulk data between the host and the udc. a data field is made up of 0 to 1023 bytes. each byte is transmitted lsb first. cyclic redundancy check fields are used to detect errors introduced during transmission of token and data packets, and is applied to all the fields in the packet except the pid field (recall the pid contains its own 4-bit ones complement check field for error detection). token packets use a 5-bit crc (x 5 +x 2 +1) and data packets use a 16-bit crc (x 16 +x 15 +x 2 +1). for both crcs, the checker is reset to all ones at the start of each packet. table 11-11. endpoint field addressing endpoint field value udc endpoint selected 0000 endpoint 0 0001 endpoint 1 0010 endpoint 2 0011 invalid 01xx invalid 10xx invalid 11xx invalid
11-60 sa-1110 developer ? s manual peripheral control module 11.8.1.5 packet formats usb supports four packet types: token, data, handshake, and special. a token packet is placed at the beginning of a frame and is used to identify out, in, sof, and setup transactions. out and in frames are used to transfer data, sof packets are used to time isochronous transactions, and setup packets are used for control transfers to configure endpoints. a token packet consists of a sync, a pid, an address, an endpoint, and a crc5 field (see figure 11-17 ). for out and setup transactions, the address and endpoint fields are used to select which udc endpoint is to receive the data, and for an in transaction, which endpoint must transmit data. figure 11-17. in, out, and setup token packet format a start of frame (sof) is a special type of token packet that is issued by the host once every 1 ms. sof packets consist of a sync, a pid, a frame number (which is incremented after each frame is transmitted), and a crc5 field, as shown in figure 11-18 . even though the udc on the sa-1110 does not make use of the frame number field, the presence of sof packets every 1ms will prevent the udc from going into suspend mode. figure 11-18. sof token packet format data packets follow token packets, and are used to transmit data between the host and udc. there are two types of data packets as specified by the pid: data0 and data1. these two types are used to provide a mechanism to guarantee data sequence synchronization between the transmitter and receiver across multiple transactions. during the handshake phase, both communicate and agree which data token type to transmit first. for each subsequent packet transmitted, the data packet type is toggled (data0, data1, data0, and so on). a data packet consists of a sync, a pid, from 0 ? 256 bytes of data, and a crc16 field, as shown in figure 11-19 . figure 11-19. data packet format handshake packets consist of only a sync and a pid. handshake packets do not contain a crc because the pid contains its own check field. they are used to report data transaction status, including whether data was successfully received, flow control, and stall conditions. only transactions that support flow control can return handshakes. the three types of handshake packets are: ack, nak, and stall. ack indicates that a data packet was received without bit stuffing, crc, or pid check errors. nak indicates that the udc was unable to accept data from the host or it has no data to transmit. nak is also used by endpoint 1 to indicate no interrupts are pending. stall indicates that the udc is unable to transmit or receive data, and requires host intervention to clear the stall condition. bit stuffing, crc, and pid errors are signalled by the receiving unit by omitting a handshake packet. figure 11-20 shows the format of a handshake packet. figure 11-20. handshake packet format 8 bits 8 bits 7 bits 4 bits 5 bits sync pid address endpoint crc5 8 bits 8 bits 11 bits 5 bits sync pid frame number crc5 8 bits 8 bits 0 ? 256 bytes 16 bits sync pid data crc16 8 bits 8 bits sync pid
sa-1110 developer ? s manual 11-61 peripheral control module 11.8.1.6 transaction formats packets are assembled into groups to form transactions. four different transaction formats are used in the usb protocol. each is specific to a particular endpoint type: bulk, control, interrupt, and isochronous. note that isochronous and interrupt transactions are not supported by the udc and are not described in this section. endpoint 0, by default, is a control endpoint and receives only control transactions; both endpoints 1 and 2 use bulk transactions. note that all usb bus transactions are initiated by the host controller and that transmission takes place between the host and udc one direction at a time (half-duplex). bulk transactions guarantee error-free transmission of data between the host and udc by using packet error detection and retry. the three packet types used to construct bulk transactions are: token, data, and handshake. the eight possible types of bulk transactions based on data direction, error, and stall conditions are shown in figure 11-21 . note that packets sent by the udc to the host are highlighted in boldface type, and packets sent by the host to the udc are not. figure 11-21. bulk transaction formats control transactions are used by the host to configure endpoints and query their status. like bulk transactions, control transactions begin with a setup packet, followed by an optional data packet, then a handshake packet. note that control transactions, by default, use data0 type transfers. figure 11-22 shows the four possible types of control transactions. note that packets sent by the udc to the host are highlighted in boldface type, and packets sent by the host to the udc are not. action token packet data packet handshake packet host successfully received data from udc in data0/data1 ack udc temporarily unable to transmit data in none nak udc endpoint needs host intervention in none stall host detected pid, crc, or bit stuff error in data0/data1 none udc successfully received data from host out data0/data1 ack udc temporarily unable to receive data out data0/data1 nak udc endpoint needs host intervention out data0/data1 stall udc detected pid, crc, or bit stuff error out data0/data1 none packets from udc to host are boldface
11-62 sa-1110 developer ? s manual peripheral control module figure 11-22. control transaction formats control transfers are assembled by the host by first sending a control transaction to tell the udc what type of control transfer is taking place (control read or control write), followed by two or more bulk data transactions. the control transaction, by default, uses a data0 transfer, and each subsequent bulk data transaction toggles between data1 and data0 transfers. for a control write to an endpoint, out transactions are used. for control reads, in transactions are used. the transfer direction of the last bulk data transaction is reversed. it is used to report status and functions as a handshake. the last bulk data transaction always uses a data1 transfer by default (even if the previous bulk transaction used data1). for a control write, the last transaction is an in from the udc to the host, and for a control read, the last transaction is an out from the host to the udc. 11.8.1.7 udc device requests the udc ? s control, status, and data registers are used only to control and monitor the transmit and receive fifos for endpoints 2 and 3. all other udc configuration and status reporting is controlled by the host via the usb bus using device requests that are sent as control transactions to endpoint 0. each setup packet to endpoint 0 is 8 bytes long and specifies:  data transfer direction: host to device, device to host  data transfer type: standard, class, vendor  data recipient: device, interface, endpoint, other  number of bytes to transfer  index or offset  value: used to pass a variable-sized data parameter  device request table 11-12 shows a summary of all device requests. users should refer to the universal serial bus specification revision 1.0 for a full description of host device requests. action token packet data packet handshake packet udc successfully received control from host setup data0 ack udc temporarily unable to receive data setup data0 nak udc endpoint needs host intervention setup data0 stall udc detected pid, crc, or bit stuff error setup data0 none packets from udc to host are boldface table 11-12. host device request summary request name set_feature used to enable a specific feature such as device remote wake-up and endpoint stalls. clear_feature used to clear or disable a specific feature. set_configuration configures the udc for operation. used following a reset of the sa-1110 or after a reset has been signalled via the usb bus.
sa-1110 developer ? s manual 11-63 peripheral control module 11.8.2 udc register definitions all configuration, request/service, and status reporting is controlled by the usb host controller and is communicated to the udc via the usb bus. several registers are available to the programmer to control the interfacing of the udc to software. a control register is used to enable the udc and to mask the various interrupt sources that exist within the udc. a status register is used to indicate the state of the various interrupt sources. the device address register is available, which software writes when parsing a set_address command from the usb host controller. there is a register for each of the out and in endpoints ? maximum packet size. all three endpoints (control, out, and in) have a control/status register. endpoint 0 (control) has an address for the 8 x 8 data fifo used for both transmitting and receiving data, as well as a write count register used to determine how many bytes the usb host controller has sent to the endpoint 0. both endpoints 1 and 2 (out and in, respectively) share a data register address that contains an 8-bit field, which addresses the top of the transmit fifo and bottom of the receive fifo. when it is read, the receive fifo is accessed, and when it is written, the transmit fifo is accessed. note: due to the internal synchronization required by the udc ? s configuration registers, it is possible for the processor to write the udc registers and fifos too fast. it is required that all writes to the udc be complete before another write may take place. in order to guarantee that a write is complete, it is necessary to observe the effect of a write before another write may take place. for example, when writing a udc register followed by an immediate read to verify data in the same register, the first read will be invalid and the second read will have correct data. 11.8.3 udc control register the udc control register (udccr) contains seven control bits: two to enable or disable the udc and five to mask the transmit and receive fifo service requests. the following table shows the location of the udd, rim, and tim bits in udc control register (udccr). the state of rim and tim are unknown and must be initialized before enabling the udc. the udd bit is set to one, disabling the udc following a reset of the sa-1110. this gives get_configuration returns the current udc configuration to the host. set_descriptor used to set existing descriptors or add new descriptors. existing descriptors include: device, configuration, string, interface, and endpoint. get_descriptor returns the specified descriptor if it exists. set_interface used to select an alternate setting for the udc ? s interface. get_interface returns the selected alternate setting for the specified interface. get_status returns the udc ? s status including: remote wake-up, self-powered, data direction, endpoint number, and stall status. set_address sets the udc ? s 7-bit address value for all future device accesses. synch_frame used to set and then report an endpoint ? s synchronization frame. table 11-12. host device request summary request name
11-64 sa-1110 developer ? s manual peripheral control module control of the udc ? s pins to the ppc unit that configures them as inputs. writes to reserved bits should be zero. the following subsections provide detailed descriptions of each bit in the udc control register. 11.8.3.1 udc disable (udd) the udc disable (udd) bit is used to enable and disable the udc. when udd=0, the udc is enabled for serial transmission or reception. when udc=1, it is disabled and the udc+ and udc- pins are tristated. if udd is written to one the entire udc design is reset. if this is done while the udc is actively transmitting or receiving data, it stops immediately and the remaining bits within the transmit or receive serial shifter are reset. in addition, all entries within the transmit and receive fifo ar reset. 11.8.3.2 udc active (uda) this read-only bit can be read to determine if the udc is currently active. a one indicates that the udc is currently involved in a transaction. 0h 8000 0000 udccr read/write and read-only 7 6 5 4 3 2 1 0 reserved susm tim rim eim resm uda udd reset 0 1 0 0 0 0 0 1 bits name description 0udd udd disable. 0 ? udd enabled, udc+ and udc- used for usb serial transmission/reception. 1 ? udd disabled. 1 uda udc active (read-only). 0 ? udc currently inactive. 1 ? udc currently active. 2resm resume interrupt mask. 0 ? resume interrupt enabled.. 1 ? resume interrupt disabled. 3eim endpoint zero interrupt mask. 0 ? endpoint zero interrupt enabled. 1 ? endpoint zero interrupt disabled. 4rim receive interrupt mask. 0 ? receive interrupt enabled. 1 ? receive interrupt disabled. 5tim transmit interrupt mask. 0 ? transmit interrupt enabled. 1 ? transmit interrupt disabled. 6susm suspend interrupt mask. 0 ? suspend interrupt enabled. 1 ? suspend interrupt disabled. 7 reserved reserved
sa-1110 developer ? s manual 11-65 peripheral control module 11.8.3.3 resume interrupt mask (resm) the resume interrupt mask (resm) bit masks or enables the resume interrupt request. when resm=1, the interrupt is masked, and the resir bit in the status/interrupt register is not allowed to be set. when resm=0, the interrupt is enabled. whenever a suspend condition occurs, the resir bit is set. note: programming resm=1 does not affect the current state of resir. it only blocks future zero ? to ? one transitions of resir. 11.8.3.4 endpoint 0 interrupt mask (eim) the endpoint 0 interrupt mask (eim) bit is used to mask or enable the endpoint 0 interrupt request. when eim=1, the interrupt is masked and the eir bit in the status/interrupt register is not allowed to be set. when eim=0, the interrupt is enabled, and whenever an interruptible condition occurs in the receiver, the eir bit is set. note: programming eim=1 does not affect the current state of eir. it only blocks future zero ? to ? one transitions of eir. 11.8.3.5 receive interrupt mask (rim) the receive interrupt mask (rim) bit is used to mask or enable the receive fifo service request interrupt. when rim=1, the interrupt is masked and the rir bit in the status/interrupt register is not allowed to be set. when rim=0, the interrupt is enabled, and whenever an interruptible condition occurs in the receiver, the rir bit is set. note: programming rim=1 does not affect the current state of rir. it only blocks future zero to one transitions of rir. 11.8.3.6 transmit interrupt mask (tim) the transmit interrupt mask (tim) bit is used to mask or enable the transmit endpoint 2 interrupt request. when tim=1, the interrupt is masked and the tir bit in the status/interrupt register is not allowed to be set. when tim=0, the interrupt is enabled, and whenever an interruptible condition occurs in the transmitter, the tir bit is set. note: programming tim=1 does not affect the current state of tir. it only blocks future zero to one transitions of tir. 11.8.3.7 suspend interrupt mask (susm) the suspend interrupt mask (susm) bit masks or enables the suspend interrupt request. when susm=1, the interrupt is masked, and the susir bit in the status/interrupt register is not allowed to be set. when susm=0, the interrupt is enabled. whenever a suspend condition occurs, the susir bit is set. note: programming susm=1 does not affect the current state of susir. it only blocks future zero ? to ? one transitions of susir.
11-66 sa-1110 developer ? s manual peripheral control module 11.8.3.8 software control of the udc when an interrupt occurs and the interrupt service routine is entered, read the icpr, icip, or icfp registers to determine which interrupts occurred. if bit 13, udc service request, is set, then read the udc statue/interrupt register (udcsr) in the udc unit to determine which udc interrupt caused the request. based on which interrupt is set, do the following: 1. wake-up or gpion interrupt a. after wake-up or a gpion interrupt, software should read the gpion pin b. if a read of gpion is 0, then the usb cable is not connected and wake-up was due to some other occurrence. c. if a read of gpion equals 1, then the usb cable was connected. initialize the udc and clear the susm bit. note: if gpion is shared with some other device that can wake the part, you may need to disconnect and then reconnect the usb cable in order to synchronize to the pc. 2. reset interrupt a. software should write a 1 to the rstir bit of the udcsr to clear the reset interrupt. b. if a read of gpion is 0, the usb cable has been disconnected, and the part can be put into sleep mode. c. if a read of gpion is 1, then software attempts to write a 0 to the susm bit of the udccr attempting to unmask the suspend interrupt. 1. if software is able to clear this bit, then the interrupt was due to the reset being negated. software should be able to initialize any required variables and registers. 2. if software is unable to clear this bit, the interrupt was due to reset being asserted. return to main. 3. suspend interrupt a. software should be able to write a 1 to the susm bit of the udccr masking any further suspend interrupts. b. software should be able to write a 1 to the susir bit of the udcsr clearing the suspend interrupt. 4. resume interrupt a. software should be able to write a 1 then a 0 to the resm bit of the udccr clearing the internal suspend state machine. b. software may also write a 0 to the susm bit of the udccr to unmask the suspend interrupt. c. software should be able to write a 1 to the resir bit of the udcsr clearing the resume interrupt. 5. endpoint0 interrupt a. get the command packet from the fifo. b. parse the command. c. setup the endpoint to respond to the command 6. endpoint1 interrupt a. check that a complete packet is received. b. check for any errors.
sa-1110 developer ? s manual 11-67 peripheral control module c. drain the remaining bytes out of the fifo. d. setup the endpoint to get ready for a new packet of data. 7. endpoint2 interrupt a. check that a complete packet was transmitted. b. check for any errors. c. setup the endpoint to transmit a new packet of data. 11.8.4 udc address register the udc address register contains a 7-bit field that holds the device address. after a reset of the udc core, the value of this register is zero. the cpu writes an address to this register when it receives a set_address from the usb host controller. it extracts the address assigned to the udc from the set_address command and writes the value into the udc address register. the new address is not propagated to the rest of the udc core until the set_address command is completed with an acknowledged handshake from the udc. 11.8.5 udc out max packet register the udc out max packet register holds the value of the maximum packet size the udc core will accept minus one. this is done in order to accommodate maximum packets of 256 bytes, without going to a max packet field of more than 8 bits. in order to accept packets up to 256 bytes, a value of 0xff (255) should be written into the out max packet register. at reset the out max packet register contains 0x08, and will therefore accept packets of length 9 bytes or less. 0h 8000 0004 udcar read/write 7 6 5 4 3 2 1 0 reserved 7-bit function address reset 0 0 0 0 0 0 0 0 bits name description 6..0 address function address field 7-bit function address. reset to all zero. 7 ? reserved. always read zero. 0h 8000 0008 udcomp read/write 7 6 5 4 3 2 1 0 max packet size - 1 reset 0 0 0 0 1 0 0 0 bits name description 7..0 out maxp out max packet size. 8-bit field containing the value of the maximum packet size minus one.
11-68 sa-1110 developer ? s manual peripheral control module 11.8.6 udc in max packet register the udc in max packet register holds the value of the number of bytes the udc core is to transmit minus one. this is done in order to accommodate maximum packets of 256 bytes, without going to a max packet field of more than 8 bits. in order to transmit packets of 256 bytes, a value of 0xff (255) should be written into the in max packet register. at reset the in max packet register contains 0x08, and will therefore transmit packets of length 9 bytes. 11.8.7 udc endpoint 0 control/status register the udc endpoint zero control/status register contains 8 bits that are used to operate endpoint zero (control endpoint). 11.8.7.1 out packet ready (opr) the out packet ready bit is set by the udc when it receives a valid token to endpoint zero. when this bit is set, the eir bit will be set in the udc status/interrupt register if endpoint zero interrupts are enabled. this bit is cleared by writing a one to the serviced out packet ready bit (6). the udc is not allowed to enter the data phase of a transaction until this bit is cleared. if there is no data phase, then the cpu should set the data end bit (4) at the same time it clears this bit. 11.8.7.2 in packet ready (ipr) the in packet ready bit is set by the cpu after it has written a packet to the endpoint zero fifo to be transmitted. the udc will automatically clear this bit when the packet has been successfully transmitted. when this bit is cleared, the eir bit in the udc status/interrupt register will be set if endpoint zero interrupts are enabled. the cpu will not be able to clear this bit. 11.8.7.3 sent stall (sst) the sent stall bit is set by the udc when it must abort the current control transfer by issuing a stall handshake due to a protocol violation. when this bit is set, the eir bit in the udc status/interrupt register will be set if endpoint zero interrupts are enabled. the cpu clears this bit by writing a one to it. 11.8.7.4 force stall (fst) the force stall bit can be set by the udc to force the udc to issue a stall handshake. the udc issues a stall handshake for the current setup control transfer and the bit is cleared by the udc because endpoint zero cannot remain in a stalled condition. 0h 8000 000c udcimp read/write 7 6 5 4 3 2 1 0 max packet size - 1 reset 0 0 0 0 1 0 0 0 bits name description 7..0 in maxp in max packet size. 8-bit field containing the value of the number of bytes to transmit minus one.
sa-1110 developer ? s manual 11-69 peripheral control module 11.8.7.5 data end (de) the data end bit is set by the udc after it writes the last packet for the current descriptor. once the current setup transfer has ended, the udc clears this bit. when this bit is cleared the eir bit in the udc status/interrupt register will be set if endpoint zero interrupts are enabled. if there is no data phase, the cpu should set this bit at the same time it clears the opr bit (0). 11.8.7.6 setup end (se) the setup end bit is set by the udc when a control transfer ends before the de bit (4) gets set. when this bit is set the eir bit in the udc status/interrupt register will be set if endpoint zero interrupts are enabled. this bit is cleared by writing a one to the serviced setup end bit (7). when the cpu detects this bit being set (if the opr bit (0) is also set), then it should unload the new setup packet after it clears setup end. 11.8.7.7 serviced opr (so) the serviced bit will clear the opr bit (0) when writing a one. 11.8.7.8 serviced setup end (sse) the serviced setup end bit will clear the se bit (5) when writing a one. 0h 8000 0010 udccs0 read/write 7 6 5 4 3 2 1 0 sse so se de fst sst ipr opr reset 0 0 0 0 0 0 0 0 bits name description 0opr out packet ready (read-only). 1 ? out packet ready. 1ipr in packet ready (read/write 1 to set). 1 ? in packet ready. 2sst sent stall (read/write 1 to clear). 1 ? udc sent stall handshake. 3fst force stall (read/write 1 to set). 1 ? force stall handshake. 4de data end (read/write 1 to set). 1 ? the last byte of the data phase has been written. 5se setup end (read-only). 1 ? control transfer ended before data end got set. 6so serviced opr (write-only). 1 ? clear opr, bit 0. 7sse serviced setup end (write-only). 1 ? clear se, bit 5.
11-70 sa-1110 developer ? s manual peripheral control module 11.8.8 udc endpoint 1 control/status register the udc endpoint 1 control/status register contains 6 bits that are used to operate endpoint 1 (out endpoint). the table below defines the udc endpoint 1 control/status register. note: bits 7..6 are reserved for future use. the following subsections provide detailed information on the udc endpoint 1 control/status register. 11.8.8.1 receive fifo service (rfs) the receive fifo service bit will be set if the receive fifo has between 8 and 12 or more bytes (out of 20) in it. because the fifos are asynchronous, the exact threshold cannot be determined, but is guaranteed to be in this range. this signal is also used as a dma request signal to trigger the dma unit to service the fifo. 0h 8000 0014 udccs1 read/write 7 6 5 4 3 2 1 0 reserved rne fst sst rpe rpc rfs reset 0 0 0 0 0 0 0 0 bits name description 0rfs receive fifo service (read-only). 0 ? receive fifo has less than 12 bytes. 1 ? receive fifo has 12 bytes or more. 1rpc receive packet complete (read/write 1 to clear). 0 ? error/status bits invalid. 1 ? receive packet has been received and error/status bits are valid. 2rpe receive packet error (read-only). 0 ? receive packet has no errors. 1 ? receive packet has errors; valid only when rpc is set. 3sst sent stall (read/write 1 to clear). 1 ? stall handshake was sent; valid only when rpc is set. 4fst force stall (read/write). 1 ? issue stall handshakes to out tokens. 5 rne receive fifo not empty (read-only). 0 ? receive fifo empty. 1 ? receive fifo not empty. 7..6 ? reserved. always reads zero.
sa-1110 developer ? s manual 11-71 peripheral control module 11.8.8.2 receive packet complete (rpc) the receive packet complete bit gets set by the udc when an out packet has been received. when this bit is set the rir bit in the udc status/interrupt register will be set if receive interrupts are enabled. this bit can be used to validate the other status/error bits in the endpoint 1 control/status register. the rpc bit gets cleared by writing a one to it. the udc will issue nak handshakes to all out tokens while this bit is set. 11.8.8.3 receive packet error (rpe) the receive packet error bit will be set if a crc, bit stuffing, data toggle mismatch, or fifo overrun error occurs. it is only valid if the rpc bit (1) is set and gets cleared when the rpc bit gets cleared. 11.8.8.4 sent stall (sst) the sent stall bit is set by the udc when it must abort the current transfer by issuing a stall handshake due to a protocol violation (the host sends more data than the maximum packet size). the cpu clears this bit by writing a one to it. 11.8.8.5 force stall (fst) the force stall bit can be set by the udc to force the udc to issue a stall handshake to all out tokens. stall handshakes will continue to be sent until the cpu clears this bit. the sent stall bit (3) will be set when the stall state is actually entered (this may be delayed if the udc is active when the fst bit is set), and the stall state will not be exited until both the fst and sst bits are cleared. when the host sends a command, such as clearfeature(halt), the udc is required to reinitialize its data toggle flag back to data0. in order to reinitialize this internal flag, software must: 1. set the fst bit and wait for it to set. 2. clear the fst bit and wait for it to clear. 3. clear the sst bit and wait for it to clear. 11.8.8.6 receive fifo not empty (rne) the receive fifo not empty bit indicates that there is unread data in the receive fifo. this bit must be polled when the rpc bit is set to determine if there is any data in the fifo that dma did not read. the receive fifo must continue to be read until this bit clears or data will be lost. when the host sends a command, such as clearfeature(halt), the udc is required to reinitialize its data toggle flag back to data0. in order to reinitialize this internal flag, software must set the fst bit, and wait for it to set, then clear the fst bit and wait for it to clear, and then clear the sst bit and wait for it to clear.
11-72 sa-1110 developer ? s manual peripheral control module 11.8.9 udc endpoint 2 control/status register the udc endpoint 2 control status register contains 6 bits that are used to operate endpoint 2 (in endpoint). the following table describes the udc endpoint 2 control status register. note: bits 7and 6 are reserved for future use. the following subsections provide detailed information on the udc endpoint 2 control status register. 11.8.9.1 transmit fifo service (tfs) the transmit fifo service bit will be active if there are 8 or less (out of 16) bytes remaining in the transmit fifo. this bit will be used as a dma request to trigger the dma unit to service the transmit fifo. 11.8.9.2 transmit packet complete (tpc) the transmit packet complete bit will be set by the udc when an entire packet has been sent to the host. when this bit is set, the tir bit in the udc status/interrupt register will be set if transmit interrupts are enabled. this bit can be used to validate the other status/error bits in the endpoint 2 control/status register. the tpc bit gets cleared by writing a one to it. the udc will issue nak handshakes to all in tokens while this bit is set. 0h 8000 0018 udccs2 read/write 7 6 5 4 3 2 1 0 reserved fst sst tur tpe tpc tfs reset 0 0 0 0 0 0 0 0 bits name description 0tfs transmit fifo service (read-only). 0 ? transmit fifo has more than 8 bytes. 1 ? transmit fifo has 8 bytes or less. 1tpc transmit packet complete (read/write 1 to clear). 0 ? error/status bits invalid. 1 ? transmit packet has been sent and error/status bits are valid. 2tpe transmit packet error (read-only). 0 ? transmit packet was received with no errors. 1 ? transmit packet has errors and the host did not issue ack. valid only when rpc is set. 3tur transmit fifo underrun. 1 ? transmit fifo experienced an underrun. valid only when tpc is set. 4sst sent stall (read/write 1 to clear). 1 ? stall handshake was sent. valid only when tpc is set. 5fst force stall (read/write). 1 ? issue stall handshakes to in tokens. 7..6 ? reserved. always read zero.
sa-1110 developer ? s manual 11-73 peripheral control module 11.8.9.3 transmit packet error (tpe) the transmit packet error bit acts as a status bit and will be valid while tpc is set. the tpe bit being set will indicate that the host did not issue an ack handshake to the current packet. the tpe bit will be cleared when the tpc bit is cleared. 11.8.9.4 transmit underrun (tur) the transmit underrun bit will be set if the transmit fifo experiences an underrun. this bit will be valid when the tpc bit is set. when the udc experiences an underrun, the packet is shortened and the crc is corrupted to ensure that the host discards the packet. the tur bit will be cleared when the tpc bit is cleared. 11.8.9.5 sent stall (sst) the sent stall bit indicates that a stall handshake was issued to the host. the cpu writes a one to this bit to clear it. when this bit is cleared the transmit fifo is flushed. 11.8.9.6 force stall (fst) the cpu can set the force stall bit to force the udc to issue a stall handshake to all in tokens. stall handshakes will continue to be sent until the cpu clears this bit. the sent stall bit (4) will be set when the stall state is actually entered (this may be delayed if the udc is active when the fst bit is set), and the stall state will not be exited until both the fst and sst bits are cleared. when the host sends a command, such as clearfeature(halt), the udc is required to reinitialize its data toggle flag back to data0. in order to reinitialize this internal flag, software must: 1. set the fst bit and wait for it to set. 2. clear the fst bit and wait for it to clear. 3. clear the sst bit and wait for it to clear.
11-74 sa-1110 developer ? s manual peripheral control module 11.8.10 udc endpoint 0 data register the udc endpoint 0 data register is actually an 8-bit x 8-entry bidirectional fifo. when the host transmits data to the udc endpoint 0, the cpu reads the udc endpoint 0 register to access the data. when the udc is sending data to the host, the cpu writes the data to be sent into the udc endpoint 0 register. although the same fifo can be read and written by the cpu during various points in a control sequence, the cpu may not read and write the fifo at the same time. the direction that the fifo is flowing is controlled by the udc. normally, the udc will be in an idle state, waiting for the host to send commands. when this happens, the udc fills the fifo with the command from the host and the cpu reads the command from the fifo once it has arrived. the udc will do a partial decode of the command to determine if the cpu is going to be filling the fifo with data to send to the host. if so, the direction is turned around to accept data from the cpu and have the udc transmit the data. if the command is such that no data will be required from the udc, then this will not happen. the only time the cpu may write the endpoint 0 fifo is when a valid command from the host has been received which requires a transmission in response, that is, a get_descriptor command. 0h 8000 001c udcd0 read/write 7 6 5 4 3 2 1 0 bottom of endpoint 0 fifo reset 0 0 0 0 0 0 0 0 read access 7 6 5 4 3 2 1 0 top of endpoint 0 fifo reset 0 0 0 0 0 0 0 0 write access bits name description 7..0 data top/bottom of endpoint 0 fifo data. read ? bottom of endpoint 0 fifo data. write ? top of endpoint 0 fifo data.
sa-1110 developer ? s manual 11-75 peripheral control module 11.8.11 udc endpoint 0 write count register the udc endpoint 0 write count register can be read when a packet has been received by the endpoint 0 to determine how many bytes to read out of the udc endpoint 0 data register. when data is present in the fifo, this 4-bit field should read between 1 and 8. 11.8.12 udc data register the udc data register (udcdr) is an 8-bit register corresponding to both the top and bottom entries of the transmit and receive fifos, respectively. data is placed by the udc ? s receive logic into the top of the receive fifo. the data is transferred down the fifo to the lowest location that is empty. when udcdr is read, the bottom entry of the 8-bit receive fifo is accessed. after the read, the bottom fifo entry is invalidated, which causes all data in the fifo to automatically transfer down one location. when udcdr is written, the topmost fifo entry of the 8-bit transmit fifo is accessed. after a write, the data is automatically transferred down the fifo to the lowest location that is empty. the udc ? s transmit logic takes 8-bit values from the bottom of the transmit fifo one at a time, places the data into a serial shifter, and transmits the value out onto the udc pins. each time a value is taken from the bottom entry, the location is invalidated, which causes all data in the fifo to automatically transfer down one location. 0h 8000 0020 udcwc read-only 7 6 5 4 3 2 1 0 reserved write count reset 0 0 0 0 0 0 0 0 bits name description 3..0 wc endpoint 0 write count (read-only). 4-bit field representing the number of bytes in the endpoint 0 fifo. 7..4 ? reserved. always reads zero.
11-76 sa-1110 developer ? s manual peripheral control module the following table shows the location of the top/bottom of the transmit/receive fifos in the udc data register (udcdr). note that both fifos are cleared when the sa-1110 is reset and when udd is written to zero. after either of these actions takes place, the user may prime the transmit fifo by writing up to sixteen 8-bit values to the udcdr before enabling the udc. 11.8.13 udc status/interrupt register the udc status/interrupt register (udcsr) contains bits that are used to generate the udc ? s interrupt request. each bit in the udc status/interrupt register is logically ored together to produce one interrupt request. when the isr for the udc is executed, it must read the udc status/interrupt register to determine why the interrupt occurred. every bit in the udcsr is controlled by a mask bit in the udc control register. the mask bits, when set, will prevent a status bit in the udcsr from being set. if the mask bit for a particular status bit is cleared and an interruptible condition occurs, the status bit will be set. in order to clear status bits, the cpu must write a one into the position that it wishes to clear. the interrupt request for the udc will remain active as long as the value of the udcsr is non-zero. 11.8.13.1 endpoint 0 interrupt request (eir) the endpoint 0 interrupt request will be set if the eim bit in the udc control register is cleared, and in the udc endpoint 0 control/status register, the out packet ready bit gets set, the in packet ready bit gets cleared, the data end bit gets cleared, the setup end bit gets set, or the sent stall bit gets set. the eir bit is cleared by writing a one to it. 11.8.13.2 receive interrupt request (rir) the receive interrupt request bit gets set if the rim bit in the udc control register is cleared and the rpc bit in the udc endpoint 1 control/status register gets set. the rir bit is cleared by writing a one to it. 0h 8000 0028 udcdr read/write 7 6 5 4 3 2 1 0 bottom of receive fifo reset 0 0 0 0 0 0 0 0 read access 7 6 5 4 3 2 1 0 top of transmit fifo reset 0 0 0 0 0 0 0 0 write access bits name description 7..0 data top/bottom of transmit/receive fifo data. read ? bottom of receive fifo data. write ? top of transmit fifo data.
sa-1110 developer ? s manual 11-77 peripheral control module 11.8.13.3 transmit interrupt request (tir) the transmit interrupt request bit gets set if the tim bit in the udc control register is cleared and the tpc bit in the udc endpoint 2 control/status register gets set. the tir bit is cleared by writing a one to it. 11.8.13.4 suspend interrupt request (susir) the suspend interrupt request bit will be set if the susm bit in the udc control register is cleared and the usb bus remains idle for more than 3 ms. the susm bit gets cleared by writing a one to it. 11.8.13.5 resume interrupt request (resir) the resume interrupt request bit will be set if the resm bit in the udc control register is cleared, the udc is currently in the suspended state, and the usb bus is driven with resume signalling. 11.8.13.6 reset interrupt request (rstir) the reset interrupt request register will be set if the rem bit in the udc control register is cleared and the host issues a reset. when the host issues a reset, the entire udc is reset. the rstir bit retains its state so software can determine that the design was reset. 0h 8000 0030 udcsr read/write (clear) 7 6 5 4 3 2 1 0 reserved rstir resir susir tir rir eir reset 0 0 0 0 0 0 0 0 bits name description 0eir endpoint 0 interrupt request (read/write clear). 1 ? endpoint 0 needs service. 1rir receive interrupt request (read/write clear). 1 ? receive endpoint (1) needs service. 2tir transmit interrupt request (read/write clear). 1 ? transmit endpoint (2) needs service. 3susir suspend interrupt request (read/write clear). 1 ? udc received suspend signalling from the host. 4resir resume interrupt request (read/write clear). 1 ? udc received resume signalling from the host. 5rstir reset interrupt request (read/write clear). 1 ? udc was reset by the host. 7..6 ? reserved. always reads zero.
11-78 sa-1110 developer ? s manual peripheral control module 11.8.14 udc register locations table 11-13 shows the registers associated with the udc and the physical addresses used to access them. 11.9 serial port 1 ? gpclk/uart serial port 1 is a combination general-purpose clock controller (gpclk) and universal asynchronous receiver/transmitter (uart) serial controller. the user can configure it to perform one of the two functions, but operation of both modes using serial port 1 ? s pins cannot occur simultaneously however, the peripheral pin control (ppc) unit can be configured to take control of two gpio pins and use them for uart transmission, while serial port 1 ? s pins are used for gpclk operation. see the section 11.13, ? peripheral pin controller (ppc) ? on page 11-167 for a description of how the ppc is configured to allow use of both the gpclk and uart. used as a gpclk controller, serial port 1 can output a clock on gpio pin 16 with a frequency in the range of 900 hz to 3.6864 mhz. used as a uart, serial port 1 is identical to serial port 3. it supports most of the functionality of the 16c550 protocol including 7 and 8 bits of data (odd, even, or no parity), one start bit, either one or two stop bits, and transmits a continuous break signal. an interrupt is generated when a framing, parity, or receiver overrun error is present within the bottom four entries of the receive fifo, when the transmit fifo is half-empty or the receive fifo is one- to two-thirds full, when a begin and end of break is detected on the receiver, and when the receive fifo is partially full and the receiver is idle for three or more frame periods. because programming and operation of serial port 1 as a uart is identical to serial port 3, see the section 11.11, ? serial port 3 ? uart ? on page 11-109 for a complete description of using serial port 1 in uart mode. table 11-13. udc control, data, and status register locations address name description 0h8000 0000 udccr udc control register 0h8000 0004 udcar udc address register 0h8000 0008 udcomp udc out max packet register 0h8000 000c udcimp udc in max packet register 0h8000 0010 udccs0 udc endpoint 0 control/status register 0h8000 0014 udccs1 udc endpoint 1 (out) control/status register 0h8000 0018 udccs2 udc endpoint 2 (in) control/status register 0h8000 001c udcd0 udc endpoint 0 data register 0h8000 0020 udcwc udc endpoint 0 write count register 0h8000 0024 ? reserved 0h8000 0028 udcdr udc transmit/receive data register (fifos) 0h8000 002c ? reserved 0h8000 0030 udcsr udc status/interrupt register
sa-1110 developer ? s manual 11-79 peripheral control module the external pins dedicated to this interface are txd1 and rxd1. if serial transmission is not required and both the gpclk and uart are disabled, control of these pins is given to the peripheral pin control (ppc) unit for use as general-purpose input/output pins (noninterruptible). see the section 11.13, ? peripheral pin controller (ppc) ? on page 11-167 . modem control signals (rts, cts, dtr, and dsr) are not provided in this block but can be implemented using the general-purpose i/o port (gpio) pins described in the chapter 9, ? system control module ? . 11.9.1 gpclk operation following reset, both the gpclk and uart are disabled. this causes the peripheral pin controller (ppc) to assume control of the port ? s pins. reset causes the ppc to configure all of the peripheral pins as inputs, including serial port 1 ? s transmit (txd1) and receive (rxd1) pins. 11.9.1.1 simultaneous use of the uart and gpclk serial port 1 contains a control bit to select which serial protocol to use: gpclk or uart. note that the two protocols cannot be combined at the same time (gpclk transmit and uart receive). however, since the gpclk and uart are fully independent blocks, a mode is supported that allows the user to enable the gpclk using serial port 1 ? s pins (txd1 and rxd1). the uart is enabled using two gpio pins (gpio<14> for transmit and gpio<15> for receive operation). this mode is enabled by setting the uart pin reassignment (upr) control bit within the peripheral pin controller (ppc). section 11.13, ? peripheral pin controller (ppc) ? on page 11-167 . note that when this mode is enabled, serial port 1 ? s control bit, which selects gpclk versus uart operation, is ignored and serial port 1 defaults to gpclk mode. ? 11.9.2 gpclk control register 0 gpclk control register 0 (gpclkr0) contains 3 bit fields that control various functions within the gpclk. 11.9.2.1 gpclk/uart select (sus) the gpclk/uart select (sus) bit is used to select whether serial port 1 is used for gpclk or uart operation. when sus=0, gpclk operation is selected. when sus=0 control of the transmit pin (txd1) is given to the ppc unit; when sus=0 control of the receive pin (rxd1) is given to the ppc unit. when sus=1, uart operation is selected and the state of all remaining gpclk register bits is ignored (remaining unchanged) and control of the txd1 and rxd1 pins is given to the uart. see the section 11.11, ? serial port 3 ? uart ? on page 11-109 for a description of the programming and operation of serial port 1 as a uart. the sus bit is the only bit within the control register that is reset, placing serial port 1 into gpclk mode while disabling the transmitter and receiver. 11.9.2.2 sample clock enable (sce) the sample clock enable (sce) bit is used to enable or disable driving or receiving a clock using gpio pin 16. when sce=0, the sample clock is disabled. when sce=1, the sample clock is enabled.
11-80 sa-1110 developer ? s manual peripheral control module 11.9.2.3 sample clock direction (scd) when the sample clock function is enabled (sce=1), the sample clock direction (scd) bit is used to select whether the sample clock is an input from or an output to gpio pin 16. when scd=0, the sample clock is input using gpio pin 16 and is not used. when scd=1, the sample clock, which is generated within the gpclk unit (the clock that is output after dividing the 3.6864-mhz reference by the programmable brd field), is output to gpio pin 16 in frequency ranging from 900 hz to 3.6864 mhz. the following table shows the location of all bit fields located in gpclk control register 0 (gpclkr0). the gpclk must be disabled (sus=0) when changing the state of any bit within this register. note: a question mark (?) signifies that the reset value of that bit is undefined when the processor has completed its reset cycle. address: 0h 8002 0060 gpclkr0 read/write bit 7 6 5 4 3 2 1 0 reserved reserved scd sce reserved reserved reserved sus reset ? ? ? ? ? ? ? 0 bit name description 0sus gpclk/uart select. 0 ? gpclk mode selected. 1 ? uart mode selected. note: for sus=0, txd1 and rxd1 control is given to the ppc unit. if upr is set in the ppc unit, sus is ignored, the uart uses gpio<14> to transmit and gpio<15> to receive data, and serial port 1 defaults to gplck mode. the user must also program the gafr and gpdr registers appropriately in the gpio unit. 1 reserved reserved for future expansion. 2 reserved reserved for future expansion. 3 reserved reserved for future expansion. 4sce sample clock enable. 0 ? sample clock disabled. 1 ? sample clock enabled. 5scd sample clock direction. 0 ? if sample clock enabled, it is input on gpio pin 16 and is not used. 1 ? the sample clock which is generated within the gpclk unit (the clock that is output after dividing the 3.6864 mhz reference by the programmable brd field), is output to the gpio pin 16 in the frequency range of 900 hz ? 3.6864mhz.. 6 reserved reserved for future expansion. 7 reserved reserved for future expansion.
sa-1110 developer ? s manual 11-81 peripheral control module 11.9.3 gpclk control register 1 gpclk control register 1 (gpclkr1) contains one bit field that controls the general purpose clock. 11.9.3.1 transmit enable (txe) the transmit enable bit enables and disables the gpclk. when txe=0, the gpclk transmitter logic is disabled. the clocks are turned off to save power. when txe=1, the gpclk transmitter logic is enabled note: you must first program all other control bits before setting the txe bit. the following table shows the location of the txe bit within gpclk control register 1. the txe bit is reset to a known state to ensure the gpclk is disabled following a reset of the sa-1110. all other bits shown in the table are reserved for future use. 0h 8002 0064 gpclkr1 read/write 7 6 5 4 3 2 1 0 reserved txe reserved reset ? ? ? ? ? ? 0 ? bits name description 1txe transmit enable 0 ? gpclk transmit logic disabled. control of he txd1 pin is given to the ppc unit if sus=0 1 ? gpclk transmit logic enabled if sus=0. 7.. 2 and 0 ? reserved.
11-82 sa-1110 developer ? s manual peripheral control module 11.9.4 gpclk control registers 2 and 3 gpclk control register 2 (gpclkr2) contains the upper 4 bits and gpclk control register 3 (gpclkr3) the lower 8 bits of the baud rate divisor field. note: a question mark (?) signifies that the reset value of that bit is undefined when the processor has completed its reset cycle. 11.9.4.1 baud rate divisor (brd) the 12-bit baud rate divisor (brd) field is used to select the baud or bit rate of the gpclk output clock. a total of 4096 different baud rates can be selected, ranging from a minimum of 900 hz to 3.6864 mhz. the baud rate generator uses the 3.6864-mhz clock generated by the on-chip pll and first divides it by the programmable baud rate using brd. the resultant clock is sent out gpio pin 16. the resultant baud rate given a specific brd value, or required brd value given a desired baud rate, can be calculated using the following two respective equations, where brd is the decimal equivalent of the unsigned binary value programmed within the bit field: the following tables show the bit locations corresponding to the baud rate divisor field that is split between two registers. the upper 4 bits of brd reside within gpclkr1and the lower 8 bits reside within gpclkr2. the gpclk must be disabled (sus=0) whenever these registers are written. note that writes to reserved bits are ignored and reads return zeros; question marks indicate that the values are unknown at reset. baudrate 3.6864 6 10 brd 1 + () ------------------------------ - = brd 3.6864 6 10 baudrate ------------------------------ -1 ? = 0h 8002 006c gpclkr2 read/write 7 6 5 4 3 2 1 0 reserved brd 11..8 reset 0 0 0 0 ? ? ? ? bits name description 3..0 brd 11..8 baud rate divisor. encoded value (from 0 to 4095). used to generate the baud rate of the gpclk. baud rate = 3.6864x10 6 /((brd+1)), where brd is a decimal value. 7..4 ? reserved.
sa-1110 developer ? s manual 11-83 peripheral control module 11.9.5 uart register locations table 11-14 shows the registers associated with the uart and the physical addresses used to access them. see the section 11.9, ? serial port 1 ? gpclk/uart ? on page 11-78 for a description of the programming and operation of the uart (serial port 1 ? s uart is identical to serial port 3 ? s uart). 0h 8002 0070 gpclkr3 read/write 7 6 5 4 3 2 1 0 brd 7..0 reset ? ? ? ? ? ? ? ? bits name description 7..0 brd 7..0 baud rate divisor. encoded value (from 0 to 4095). used to generate the baud rate of the gpclk. baud rate = 3.6864x10 6 /((brd+1)), where brd is a decimal value. table 11-14. uart control, data, and status register locations address name description 0h 8001 0000 utcr0 uart control register 0 0h 8001 0004 utcr1 uart control register 1 0h 8001 0008 utcr2 uart control register 2 0h 8001 000c utcr3 uart control register 3 0h 8001 0010 ? reserved 0h 8001 0014 utdr uart data register 0h 8001 0018 ? reserved 0h 8001 001c utsr0 uart status register 0 0h 8001 0020 utsr1 uart status register 1 0h 8001 0024 ? 0h 8001 005c ? reserved
11-84 sa-1110 developer ? s manual peripheral control module 11.9.6 gpclk register locations table 11-15 shows the registers associated with the gpclk and the physical addresses used to access them. 11.10 serial port 2 ? infrared communications port (icp) the infrared communications port (icp) operates at half-duplex and provides direct connection to commercially available infrared data association (irda) compliant led transceivers. the icp supports both the original irda standard with speeds up to 115.2 kbps as well as the newer 4-mbps standard. both standards use different bit encoding techniques and serial packet formats. low-speed irda transmission uses the hewlett-packard serial infrared standard (hp-sir * ) for bit encoding and a universal asynchronous receiver-transmitter (uart) as the serial engine; high-speed uses four-position pulse modulation (4ppm) and a specialized serial packet protocol developed expressly for irda transmission. to support these two standards, the icp contains two separate blocks, each comprised of a bit encoder/decoder and serial-to-parallel data engine. the engine within the icp that implements the special 4-mbps protocol is called the high-speed serial to parallel (hssp) receiver-transmitter. only one of the two standards can be enabled at a time (the user cannot enable low-speed transmit and high-speed receive at the same time). to support a variety of irda transceivers, both the transmit and receive data pins can be individually configured to communicate either using normal or inverted data. additionally, if irda transmission is not needed, the icp ? s uart can be enabled while disabling the hp-sir * bit encoder for use as a general-purpose serial port. note: programming and operation of serial port 2 ? s uart is identical to serial port 3. refer to section 11.11, ? serial port 3 ? uart ? on page 11-109 for a complete description of using the icp for low-speed irda operation. the external pins dedicated to the icp are txd2 and rxd2. if serial transmission is not required and the icp is disabled, control of these pins is given to the peripheral pin control (ppc) unit for use as general-purpose input/output pins (noninterruptible). refer to section 11.13, ? peripheral pin controller (ppc) ? on page 11-167 . table 11-15. gpclk control register locations address name description 0h 8002 0060 gpclkr0 gpclk control register 0 0h 8002 0064 gpclkr1 gpclk control register 1 0h 8002 0068 ? reserved 0h 8002 006c gpclkr2 gpclk control register 2 0h 8002 0070 gpclkr3 gpclk control register 3 0h 8002 0074 ? reserved 0h 8002 0078 ? reserved 0h 8002 007c ? reserved 0h 8002 0080 ? reserved 0h 8002 0084 ? reserved 0h 8002 0088 ? 0h 8002 ffff ? reserved
sa-1110 developer ? s manual 11-85 peripheral control module 11.10.1 low-speed icp operation following reset, both the uart and hssp are disabled, which causes the peripheral pin controller (ppc) to assume control of the port ? s pins. reset causes the ppc to configure all of the peripheral pins as inputs, including serial port 2 ? s transmit (txd2) and receive (rxd2) pins. reset also causes the uart ? s transmit and receive fifos to be flushed (all entries invalidated). before enabling the icp for low-speed operation, the user must first clear any writable or ? sticky ? status bits, which are set by writing a one to each bit. next, the desired mode of operation is programmed in the control registers. at this point the user may ? prime ? the uart ? s transmit fifo by writing up to eight values, or the fifo can remain empty and either programmed i/o or the dma can be used to service it after the icp is enabled. once the icp is enabled, transmission/reception of data can begin on the transmit (txd2) and receive (rxd2) pins. for low-speed operation, all serial data that is transferred between the txd2/rxd2 pins and the icp ? s uart is modulated/demodulated according to the hp-sir * irda standard. the irda standard also specifies the frame format that must be used by the uart. 11.10.1.1 hp-sir * modulation hewlett-packard serial infrared * (sir) modulation is used for low-speed transmission up to 115.2 kbps. logic zero is represented by a pulse of light that is either 3/16 of the bit time wide, or 1.6 s wide (1.6 s is 3/16 of the bit time for the highest bit rate of 115.2 kbps). the rising edge of the pulse corresponds to the start of the zero bit time. logic one is represented by the absence of light pulses. figure 11-23 shows an example of hp-sir * modulation of the byte, 8 ? b01011001. note that the byte is transmitted starting with the lsb first. 11.10.1.2 uart frame format for transmission rates up to 115.2 kbps, the icp ? s uart is used. the user must program it to produce a frame that produces 8 bits of data, one stop bit, and no parity, as shown in figure 11-24 . note that pe=1, sbs=1, dss=0, sce=1, brk=1, rxe=0, txe=0, and brd=0x000 are illegal programming modes for irda operation and will produce unpredictable results. see section 11.11, ? serial port 3 ? uart ? on page 11-109 for a complete description of how to program and operate the icp ? s uart. figure 11-23. hp-sir * modulation example digital data hp-sir * data bit value 10011010 3/16 of the bit time lsb msb
11-86 sa-1110 developer ? s manual peripheral control module figure 11-24. uart frame format for irda transmission (<= 115.2 kbps) 11.10.2 high-speed icp operation before enabling the icp for high-speed operation, the user must first clear any writable or ? sticky ? status bits that are set by writing a one to each bit. next, the desired mode of operation is programmed in the control registers. at this point the user can ? prime ? the hssp ? s transmit fifo by writing up to 16 values, or the fifo can remain empty and either programmed i/o or the dma can be used to service it after the hssp is enabled. once the hssp is enabled, transmission/reception of data can begin on the transmit (txd2) and receive (rxd2) pins. for high-speed operation, all serial data, which is transferred between the txd2/rxd2 pins and the icp ? s hssp, is modulated/demodulated according to the 4ppm irda standard. for high-speed transmission, both the modulation technique and the hssp ? s frame format are discussed in the following sections. 11.10.2.1 4ppm modulation four-position pulse modulation (4ppm) is used for the high-speed transmission rate of 4.0 mbps. two data bits are encoded at a time by placing a single 125 ns light pulse within one of four time slots. the four time slots are collectively termed a ? chip. ? bytes are encoded one at a time. they are divided into four individual nibbles (2-bit pairings) and the least significant nibble is transmitted first. figure 11-25 shows the 4ppm encoding for the four possible 2-bit combinations and figure 11-26 shows an example of 4ppm modulation of the byte 8 ? b10110001 that is constructed using four chips. note that bits within each nibble are not reordered, but nibble 0 (least significant) is transmitted first, ending with nibble 3 (most significant). figure 11-25. 4ppm modulation encodings start bit data 7 data 6 data 5 data 4 data 3 data 2 data 1 data 0 stop bit utcr0-2 programming: pe=0 dss = 1 tce = don ? t care rxe = 1 rie = 0 or 1 oes = don ? t care sce = 0 brd = 0x001 to 0xfff txe = 1 tie = 0 or 1 sbs = 0 rce = don ? t care brk = 0 chip timeslots 1234 data = 00 data = 01 data = 10 data = 11
sa-1110 developer ? s manual 11-87 peripheral control module 11.10.2.2 hssp frame format when the 4-mbps transmission rate is used, the high-speed serial/parallel (hssp) interface within the icp is used along with the 4ppm bit encoding. the hssp frame format is shown in figure 11-27 . figure 11-27. high-speed serial frame format for irda transmission (4.0 mbps) the preamble, start, and stop flags are a mixture of chips that contain either 0, 1, or 2 pulses within the four time slots. chips with 0 and 2 pulses are used to construct flags because they represent invalid data bit pairings (one pulse required per chip to represent one of four bit pairs). the preamble contains 16 repeated transmissions of the four chips: 1000 0000 1010 1000; the start flag contains one transmission of eight chips: 0000 1100 0000 1100 0110 0000 0110 0000; and the stop flag contains one transmission of eight chips: 0000 1100 0000 1100 0000 0110 0000 0110. the address, control, data, and crc-32 use the standard 4ppm chip encoding to represent 2 bits per chip. figure 11-26. 4ppm modulation example 4ppm data reordered nibbles 01001110 12 5ns timeslots 1234123412341234 chips 1 2 34 receive data sample counter frequency = 6x pulse width; each timeslot sampled on third clock. original byte order 10110001 nibble 3 nibble 2 nibble 1 nibble 0 nibble 0 nibble 1 nibble 2 nibble 3 64 chips 8 chips 4 chips (8 bits) 4 chips (8 bits) 8180 chips max (2045 bytes) 16 chips (32 bits) 8 chips preamble start flag address control (optional) data crc-32 stop flag start flag |0000|1100|0000|1100|0110|0000|0110|0000| |0000|1100|0000|1100|0000|0110|0000|0110| stop flag preamble |1000|0000|1010|1000|... repeated 16 times
11-88 sa-1110 developer ? s manual peripheral control module 11.10.2.3 address field the 8-bit address field is used by a transmitter to target a select group of receivers when multiple stations are connected to the same set of serial lines. the address allows up to 255 stations to be uniquely addressed (00000000 to 11111110). the global address (11111111) is used to broadcast messages to all stations. register hscr1 is used to program a unique address for broadcast recognition. control bit hscr0:ame is used to enable/disable the address match function. note that the address of received frames is stored in the receive fifo along with normal data and that it is transmitted and received starting with its lsb and ending with its msb. 11.10.2.4 control field the ipc control field is 8 bits and is optional (as defined by the user). serial port 2 does not provide any hardware decode support for the control byte, but instead treats all bytes between the address and the crc as data. note that the control field is transmitted and received starting with its lsb and ending with its msb. 11.10.2.5 data field the data field can be any length that is a multiple of 8 bits from 0 to 2045 bytes. the user determines the data field length according to the application requirements and transmission characteristics of the target system. usually a length is selected that maximizes the amount of data that can be transmitted per frame while allowing the crc checker to be able to consistently detect all errors during transmission. note that serial port 2 does not contain any hardware that restricts the maximum amount of data transmitted or received. it is up to the user to maintain these limits. if a data field that is not a multiple of 8 bits is received, an abort is signalled. also note that each byte within the data field is transmitted and received starting with its lsb and ending with its msb. 11.10.2.6 crc field the hssp uses the established 32-bit cyclic redundancy check (crc-32) to detect bit errors that occur during transmission. a 32-bit crc is computed using the address, control, and data fields, and is included in each frame. a separate crc generator is implemented in both the transmit and receive logic. the transmitter calculates a crc, and while data is actively transmitted, places the inverse of the resultant 32-bit value at the end of each frame before the flag is transmitted. in a similar manner, the receiver also calculates a crc for each received data frame and compares the calculated crc to the expected crc value contained within the end of each received frame. if the calculated value does not match the expected value, an interrupt is signalled. the crc computation logic is preset to all ones before reception or transmission of each frame and the result is inverted before it is used for comparison or transmission. note that unlike the address, control, and data fields, the 32-bit inverted crc value is transmitted and received from least significant byte to most significant, and within each byte the least significant nibble or chip is encoded or decoded first. the cyclic redundancy checker uses the 32-term polynomial: crc x () x 32 x 26 x 23 x 22 x 16 x 12 x 11 x 10 x 8 x 7 x 5 x 4 x 2 x 1 + + + + + + + +++++++ ( ) =
sa-1110 developer ? s manual 11-89 peripheral control module 11.10.2.7 baud rate generation the baud rate is derived by dividing down a fixed 48-mhz clock generated by one of the two on-chip plls by six. the 8-mhz baud clock (or time slot) for the receive logic is synchronized with the 4ppm data stream each time a transition is detected on the receive data line using a digital pll. to encode a 4-mbps data stream, the required ? chip ? frequency is 2.0 mhz, with four time slots per chip at a frequency of 8.0 mhz. receive data is sampled halfway through each time-slot period by counting three out of the six 48-mhz clock periods that make up each time slot (see figure 11-26 ). the chips are synchronized during preamble reception. the repeating pattern (four chips repeated 16 times) is used to identify the first time slot or beginning of a chip and resets the 2-bit time-slot counter logic, such that the 4ppm data is properly decoded. 11.10.2.8 receive operation the irda standard specifies that all transmission occurs at half-duplex. this restriction forces the user to enable one direction at a given time: either the transmit or receive logic, but not both. however, the hssp ? s hardware does not impose such a restriction.the user may enable both the transmitter and receiver at the same time. although forbidden by the irda standard, this feature is particularly useful when using the icp ? s loopback mode, which internally connects the output of the transmit serial shifter to the input of the receive serial shifter. after the icp is enabled for 4-mbps transmission, the receiver logic begins by selecting an arbitrary chip boundary, receives four incoming 4ppm chips from the rxd2 pin using a serial shifter, and latches and decodes the chips one at a time. if the chips do not decode to the correct preamble, the time-slot counter ? s clock is forced to skip one 8-mhz period, effectively delaying the time-slot count by one. this process is repeated until the preamble is recognized, signifying that the time-slot counter is synchronized. the preamble can be repeated as few as 16 times or may be continuously repeated to indicate an idle receive line. at any time after the transmission of 16 preambles, the start flag can be received. the start flag is eight chips long. if any portion of the start flag does not match the standard encoding, the receive logic signals a framing error and the receive logic once again begins to look for the frame preamble. once the correct start flag is recognized, each subsequent grouping of four chips is decoded into a data byte and placed within a 5-byte temporary fifo, which is used to prevent the crc from being placed within the receive fifo. when the temporary fifo is filled, data values are pushed out one by one to the receive fifo. the first data byte of a frame is the address. if receiver address matching is enabled, the received address is compared to the address programmed in the address match value field in one of the control registers. if the two values are equal or if the incoming address contains all ones, all subsequent data bytes, including the address byte, are stored in the receive fifo. if the values do not match, the receiver logic does not store any data in the receive fifo, ignores the remainder of the frame, and begins to search for the next preamble. the second data byte of the frame can contain an optional control field as defined by the user and must be decoded in software (no hardware support within the hssp). frames can contain any amount of data in multiples of 8 bits up to a maximum of 2047 bytes (including the address and control bytes). the hssp does not limit frame size; it is the responsibility of the user to check that the size of each incoming frame does not exceed the irda protocol ? s maximum allowed frame size.
11-90 sa-1110 developer ? s manual peripheral control module when the receive fifo is one- to two-thirds full, an interrupt or dma transfer is signalled. if the data is not removed soon enough and the fifo is completely filled, an overrun error is signalled when the receive logic attempts to place additional data into the full fifo. once the fifo is full, all subsequent data bytes received are lost while all fifo contents remain intact. if any two sequential chips within the data field do not contain pulses (are 0000), the frame is aborted, the least recent or oldest byte within the temporary fifo is moved to the receive fifo (the remaining four fifo entries are discarded), the end-of-frame (eof) tag is set within the same fifo entry where the last ? good ? byte of data resides, and the receiver logic begins to search for the preamble. an abort also occurs if any data chip containing 0011, 1010, 0101, or 1001 occurs (invalid chips that do not occur in the stop flag). the receive logic continuously searches for the 8-chip stop flag. once it is recognized, the last byte that was placed within the receive fifo is flagged as the last byte of the frame and the data in the temporary fifo is removed and used as the 32-bit crc value for the frame. instead of placing this in the receive fifo, the receive logic compares it to the crc-32 value, which is continuously calculated using the incoming data stream. if they do not match, the last byte that was placed within the receive fifo is also tagged with a crc error. the crc value is not placed in the receive fifo. if the user disables the hssp ? s receiver during operation, reception of the current data byte is stopped immediately, the serial shifter and receive fifo are cleared, control of the rxd2 pin is given to the peripheral pin control (ppc) unit, and all clocks used by the receive logic are automatically shut off to conserve power. the user should ensure that the polarity of the rxd2 input is reprogrammed properly if this pin is to be used as a gpio input. 11.10.2.9 transmit operation before enabling the hssp for transmission, the user may either ? prime ? the transmit fifo by filling it with data or allow service requests to cause the cpu or dma to fill the fifo once the hssp is enabled. once enabled, the transmit logic issues a service request if its fifo is empty. for each frame output, a minimum of 16 preambles are transmitted. if data is not available after the sixteenth preamble, additional preambles are output until a byte of valid data resides within the bottom of the transmit fifo. the preambles are then followed by the start flag and then the data from the transmit fifo. four chips (8 bits) are encoded at a time and then loaded into a serial shift register. the contents are shifted out onto the txd2 pin clocked by the 8-mhz baud clock. note that the preamble, start and stop flags, and crc value are automatically transmitted and need not be placed in the transmit fifo. when the transmit fifo is emptied halfway, an interrupt and/or dma service request is signalled. if new data is not supplied soon enough, the fifo is completely emptied, and the transmit logic attempts to take additional data from the empty fifo (one of two actions can be taken as programmed by the user). an underrun can either signal the normal completion of a frame or an unexpected termination of a frame in progress. when normal frame completion is selected and an underrun occurs, the transmit logic transmits the 32-bit crc value calculated during the transmission of all data within the frame (including the address and control bytes), followed by the stop flag to denote the end of the frame. the transmitter then continuously transmits preambles until data is once again available within the fifo. once data is available, the transmitter begins transmission of the next frame. when unexpected frame termination is selected and an underrun occurs, the transmit logic outputs an abort and interrupts the cpu. an abort continues to be transmitted until data is once again available in the transmit fifo. the hssp then transmits 16 preambles, a start flag, and starts the new frame. the off-chip receiver can choose to ignore the abort and continue to receive data or signal the hssp to retry transmission of the aborted frame.
sa-1110 developer ? s manual 11-91 peripheral control module at the end of each frame transmitted, the hssp outputs a pulse called the serial infrared interaction pulse (sip). a sip is required at least every 500 ms to keep slower speed devices (115.2 kbps and slower) from colliding with the higher speed transmission. the sip simulates a start bit that causes all low-speed devices to stay off the bus for at least another 500 ms. transmission of the sip pulse causes the txd2 pin to be forced high for a duration of 1.625 s and low for 7.375 s (total sip period = 9.0 s). after the 9.0 s elapses, the preamble is then transmitted continuously to indicate to the off-chip receiver that the hssp ? s transmitter is in the idle state. the preamble continues to be transmitted until new data is available within the transmit fifo, or the hssp ? s transmitter is disabled. note that it is the responsibility of the user to ensure that a frame completes once every 500 ms such that a sip pulse is produced, keeping all low-speed devices from interrupting transmission. because most irda compatible devices produce a sip after each frame transmitted, the user only needs to ensure that a frame is either transmitted or received by the icp every 500 ms. note that frame length does not represent a significant portion of the 500 ms time frame in which a sip must be produced. at 4.0 mbps, the longest frame allowed is 16,568 bits, which takes just over 4 ms to transmit. also note that the hssp issues a sip when the transmitter is first enabled to ensure all low-speed devices are silenced before transmitting its first frame. if the user disables the hssp ? s transmitter during operation, transmission of the current data byte is stopped immediately, the serial shifter and transmit fifo are cleared, control of the txd2 pin is given to the peripheral pin control (ppc) unit, and all clocks used by the transmit logic are automatically shut off to conserve power. the user should ensure that the polarity of the txd2 output is reprogrammed properly if this pin is to be used as a gpio output. 11.10.2.10 transmit and receive fifos to reduce chip size and power consumption, the hssp ? s fifos use self-timed logic (they are not clocked). because of process and environmental variations, the depth at which a service request is triggered to empty the receive fifo is variable. this variation spans a maximum of four fifo entries; the receive fifo service request can be made at four different fifo depths.to compensate for this variability and guarantee that at least eight valid entries of data exist within the fifo before generating a service request, an extra four entries have been added to the receive fifo ( four entries more than the transmit fifo). the transmit fifo is 16 entries deep and the receive fifo is 20 entries deep. the point at which the receive fifo service request is triggered spans one fifth (four entries) of the 20-entry fifo. the service request is signalled at a depth from two-fifths full to three-fifths full (when the fifo contains nine, ten, eleven, or twelve entries of data). this service request variation applies only to an empty fifo that is filled (receive fifo). it does not apply to a full fifo that is emptied (transmit fifo). the transmit fifo is guaranteed to signal a service request when it has eight or more empty entries and negate the request when the fifo contains nine or more entries that are filled. if the dma is used to service either one or both of the hssp ? s fifos, the burst size must be set to eight words, even though more than eight entries of data may exist within the receive fifo. if programmed i/o is used to service the fifos, a maximum of 8 words may be added to the transmit fifo without checking if more space is available. likewise, a maximum of 8 words may be removed from the receive fifo without checking if more data is available. after this point, the user must poll a set of status bits that indicate if any data remains in the receive fifo or if space is available in the transmit fifo before emptying or filling the fifos any further.
11-92 sa-1110 developer ? s manual peripheral control module 11.10.2.11 cpu and dma register access sizes bit positioning, byte ordering, and addressing of the hssp is described in terms of little endian ordering. all icp (hssp and uart) registers are 8 bits wide and are located in the least significant byte of individual words. the arm peripheral bus does not support byte or half-word operations. all reads and writes of the icp by the cpu should be word ? wide. two separate, dedicated dma requests exist for both the transmit and the receive fifos. if the dma controller is used to service the transmit and/or receive fifos, the user must ensure the dma is properly configured to perform byte ? wide accesses, using 8 bytes per burst for the hssp and 4 bytes per burst for the uart. see later sections in this chapter for summaries of the icp ? s uart registers and hssp registers. 11.10.3 uart register definition the icp ? s uart is the same as serial port 3 ? s uart except that one additional register exists to control hp-sir * modulation for low-speed operation. see section 11.11, ? serial port 3 ? uart ? on page 11-109 for a description of the programming and operation of all other features of the icp ? s uart. note that the user must ensure that the uart is programmed to yield the frame format shown in figure 11-24 . 11.10.4 uart control register 4 uart control register 4 (utcr4) contains two different bit fields that control various functions for 115.2-kbps (low-speed) irda transmission. 11.10.4.1 hp-sir * enable (hse) the hp-sir * enable (hse) bit controls whether the hp-sir * bit modulation logic is enabled or disabled. when hse=0, hp-sir * modulation is disabled, and if uart operation is enabled (itr=0), it is used for normal serial transmission (nrz encoding only) rather than irda communication. when hse=1, hp-sir * modulation is enabled for low-speed irda communication; zeros are represented by pulses that are 3/16 of the programmed bit width, while ones are represented by no pulses. 11.10.4.2 low-power mode (lpm) the low-power mode (lpm) bit controls whether the hp-sir * bit modulation logic represents zeros using a pulse that is 3/16 of the chosen bit width or a fixed 1.6 s pulse width. when lpm=0, zeros are encoded as a pulse, which is 3/16 of the bit width programmed within the uart ? s baud rate divisor (brd) bit field. when lpm=1, the uart ? s programmed bit length is ignored and zeros are represented by pulses that are 1.6 s in duration. programming lpm=1 minimizes the time that the off-chip led transceiver is turned on to the minimum pulse width specified by the irda low-speed standard, which in turn, minimizes power consumption. note: a question mark (?) signifies that the reset value of that bit is undefined when the processor has completed its reset cycle.
sa-1110 developer ? s manual 11-93 peripheral control module the following table shows the location of the bits within uart control register 4; question marks indicate that the values are unknown at reset. both bits are reset to zero. note that the uart must be disabled (rxe=txe=0) when changing the state of either of these two bits. also note that writes to reserved bits are ignored and reads return zeros. 11.10.5 hssp register definitions there are six registers within the hssp: three control registers, one data register, and two status registers. the control registers are used to select irda transmission rate, address match value, whether an abort or end of frame occurs when the transmit fifo underruns, and true or complemented transmit and receive data; to enable or disable transmit and receive operation, the fifo interrupt service requests, receive address matching, and loopback mode. the data register addresses the top location of the transmit fifo and bottom location of the receive fifo. when it is read, the receive fifo is accessed, and when it is written, the transmit fifo is accessed. the status registers contain bits that signal crc, overrun, underrun, framing, and receiver abort errors as well as the transmit fifo service request, receive fifo service request, and end-of-frame conditions. each of these hardware-detected events signals an interrupt request to the interrupt controller. the status registers also contain flags for transmitter busy, receiver synchronized, receive fifo not empty, and transmit fifo not full (no interrupt generated). 11.10.6 hssp control register 0 the hssp control register 0 (hscr0) contains eight different bit fields that control various functions for 4 mbps irda transmission. 11.10.6.1 irda transmission rate (itr) the irda transmission rate (itr) bit is used to select the transmission speed of the icp. itr selects the correct type of irda bit modulation to use (hp-sir * or 4ppm), and enables the correct serial-to-parallel engine (uart or hssp). when itr=0, the hp-sir * modulator is enabled along 0h 8003 0010 utcr4 read/write 7 6 5 4 3 2 1 0 reserved lpm hse reset 0 0 0 0 0 0 ? ? bits name description 0hse hp-sir * enable. 0 ? hp-sir * modulation disabled; icp functions as normal uart if itr=0. 1 ? hp-sir * modulation enabled; icp functions as low-speed irda port if itr=0. 1lpm low-power mode. 0 ? each zero encoded as a pulse that is 3/16 of the programmed bit time if itr=0. 1 ? each zero encoded as a pulse that is 1.6 s wide if itr=0. 7..2 ? reserved.
11-94 sa-1110 developer ? s manual peripheral control module with serial port 2 ? s uart. when itr=1, the 4ppm modulator is enabled as well as the hssp. note that itr is the only control bit that affects both the uart and hssp. once one of the two speeds is selected, all further programming is controlled by the individual units (uart or hssp). 11.10.6.2 loopback mode (lbm) the loopback mode (lbm) bit is used to enable and disable the ability of the hssp ? s transmit and receive logic to communicate. when lbm=0, the hssp operates normally. the transmit and receive data paths are independent and communicate via their respective pins. when lbm=1, the output of the transmit serial shifter is directly connected to the input of the receive serial shifter internally, and control of the txd2 and rxd2 pins is given to the peripheral pin control (ppc) unit. note that even though the irda standard permits only half-duplex operation, the hssp does not restrict the user from transmitting and receiving data at the same time; both are fully independent units. this function is essential when using the hssp in loopback mode. 11.10.6.3 transmit fifo underrun select (tus) the transmit fifo underrun select (tus) bit is used both to select what action to take as a result of a transmit fifo underrun as well as mask or enable the transmit fifo underrun interrupt. when tus=0, transmit fifo underruns are used to signal the transmit logic that the end of the frame has been reached. when the transmit fifo experiences an underrun, the crc value, which is calculated continuously on outgoing data, is loaded to the serial shifter and transmitted, followed by the stop flag and sip pulse. also when tus=0, the transmit fifo interrupt is masked and the state of the transmit fifo underrun (tur) status bit is ignored by the interrupt controller. when tus=1, transmit fifo underruns are used to signal the transmit logic that the end of the frame has not yet been reached. when the transmit fifo experiences an underrun, the crc value, which is calculated continuously on outgoing data, is loaded to the serial shifter and transmitted, followed by the stop flag and sip pulse. additionally, when tus=0, the transmit fifo underrun interrupt is masked, causing the state of the transmit fifo underrun (tur) status bit to be ignored by the interrupt controller. note that programming tus=0 does not affect the current state of tur or the transmit fifo logic ? s ability to set and clear tur; it only blocks the generation of the interrupt request. when tus=1, transmit fifo underruns are used to signal the transmit logic that the end of the frame has not yet been reached and that the rate in which data is supplied to the transmit fifo is not sufficient. when the transmit fifo experiences an underrun, two sequential chips, each containing zeros (0000), are output by the transmitter to signal an abort condition; next a sip pulse is output, followed by a minimum of 16 preambles. preambles continue to be output until data is once again available within the transmit fifo. additionally, when tus=1, the transmit fifo underrun interrupt is enabled, and whenever tur is set (one), an interrupt request is made to the interrupt controller. to change the state of tus during operation, the user should fill the transmit fifo to ensure tus is not written at the same time that the transmit fifo underruns. tus is useful for ensuring that frames are not prematurely ended due to an unexpected transmit fifo underrun. at the start of a frame, the user can configure tus=1 such that any underrun signals an abort to the off-chip receiver. just before the end of the frame, the user can then configure tus=0, allowing the remaining data to be output by the transmit logic. the fifo then underruns, causing the crc, stop flag, and sip to be transmitted.
sa-1110 developer ? s manual 11-95 peripheral control module 11.10.6.4 transmit enable (txe) the transmit enable (txe) bit is used to enable and disable hssp transmit operation. when txe=0, the transmit logic is disabled and its clocks are turned off to conserve power. when txe=1, the hssp transmitter logic is enabled for irda transmission. it is required that the user first program all other control bits before setting txe. if the txe bit is cleared to zero while the hssp is actively transmitting data, transmission is stopped immediately, all data within the transmit fifo and serial output shifter is cleared, and control of the txd2 pin is given to the peripheral pin control (ppc) unit. when the transmitter is turned on (txe=0 1), a sip pulse is transmitted before transmission of data. a sip pulse is used to prevent slower devices (115.2 kbps) from attempting to take control of infrared transmission. see the previous sections for further timing details of the sip pulse. txe and rxe are the only control bits within the hssp that are initialized when a hardware reset occurs. clearing txe to zero ensures the hssp transmitter is disabled, giving control of the transmit pin to the ppc unit that configures txd1 as an input following a reset of the sa-1110. note that txe is ignored when itr=0 (enables uart operation). also note that even though the irda standard permits only half-duplex operation, the hssp does not restrict the user from transmitting and receiving data at the same time; both are fully independent units. this function is particularly useful when using the hssp in loopback mode. see the section 11.10.6.2, ? loopback mode (lbm) ? on page 11-94 . 11.10.6.5 receive enable (rxe) the receive enable (rxe) bit is used to enable or disable hssp receive operation. when rxe=0, the receive logic is disabled and its clocks are turned off to conserve power. when rxe=1, the hssp receiver logic is enabled for irda reception. it is required that the user first program all other control bits before setting rxe. if the rxe bit is cleared to zero while the hssp is actively receiving data, reception is stopped immediately, all data within the receive fifo and serial input shifter is cleared, and control of the rxd2 pin is given to the peripheral pin control (ppc) unit. note that txe and rxe are the only control bits within the hssp that are initialized when a hardware reset occurs. clearing rxe to zero ensures the hssp receiver is disabled, giving control of the receive pin to the ppc unit, which configures rxd2 as an input following a reset of the sa-1110. note that rxe is ignored when itr=0, which enables uart operation. also note that even though the irda standard permits only half-duplex operation, the hssp does not restrict the user from transmitting and receiving data at the same time; both are fully independent units. this function is particularly useful when using the hssp in loopback mode. see the section 11.10.6.2, ? loopback mode (lbm) ? on page 11-94 . 11.10.6.6 receive fifo interrupt enable (rie) the receive fifo interrupt mask (rie) bit is used to mask or enable the receive fifo service request interrupt. when rie=0, the interrupt is masked, and the state of the receive fifo service request (rfs) bit within hssp status register 0 is ignored by the interrupt controller. when rie=1, the interrupt is enabled, and whenever rfs is set (one), an interrupt request is made to the interrupt controller. note that programming rie=0 does not affect the current state of rfs or the receive fifo logic ? s ability to set and clear rfs; it only blocks the generation of the interrupt request. also note that rie does not affect generation of the receive fifo dma request , which is asserted whenever rfs=1.
11-96 sa-1110 developer ? s manual peripheral control module 11.10.6.7 transmit fifo interrupt enable (tie) the transmit fifo interrupt mask (tie) bit is used to mask or enable the transmit fifo service request interrupt. when tie=0, the interrupt is masked and the state of the transmit fifo service request (tfs) bit within hssp status register 0 is ignored by the interrupt controller. when tie=1, the interrupt is enabled, and whenever tfs is set (one), an interrupt request is made to the interrupt controller. note that programming tie=0 does not affect the current state of tfs or the transmit fifo logic ? s ability to set and clear tfs; it only blocks the generation of the interrupt request. also note that tie does not affect generation of the transmit fifo dma request, which is asserted whenever tfs=1. 11.10.6.8 address match enable (ame) the address match enable (ame) bit is used to enable or disable the receive logic from comparing the address programmed in the address match value (amv) bit field to the address of all incoming frames. when ame=1, data is stored in the receive fifo only for those frames that have addresses that match amv and for any frame that contains an address containing all ones (11111111), denoting a global address. for frames in which the address does not match, the data and crc are ignored and the receiver resumes hunting for a preamble. when ame=0, address values are not compared and the data in every frame is stored in the receive fifo. the following table shows the location of the bits within hssp control register 0. rxe and txe are the only control bits that are reset to a known state to ensure the hssp is disabled following a reset of the sa-1110. the reset state of all other control bits is unknown (indicated by question marks) and must be initialized before enabling the hssp. note that the hssp must be disabled (rxe=txe=0) when changing the state of bits 0 and 1, and bits 2 through 7 may be written while the hssp is enabled to allow various modes to be changed during active operation. note: a question mark (?) signifies that the reset value of that bit is undefined when the processor has completed its reset cycle. 0h 8004 0060 hscr0 read/write 7 6 5 4 3 2 1 0 ame tie rie rxe txe tus lbm itr reset ? ? ? 0 0 ? ? ? (sheet 1 of 2) bits name description 0itr irda transmission rate. 0 ? 115.2 kbps (selects hp-sir * modulation, enables the icp ? s uart engine). 1 ? 4.0 mbps (selects 4ppm modulation, enables the icp ? s hssp engine). 1lbm loopback mode. 0 ? normal serial port operation enabled. 1 ? output of hssp ? s transmit serial shifter is connected to input of receive serial shifter internally. control of txd2 and rxd2 pins is given to the ppc unit if itr=1. 2tus transmit fifo underrun select. 0 ? transmit fifo underrun causes crc, stop flag, and sip to be transmitted, and masks transmit underrun interrupt generation (tur ignored). 1 ? transmit fifo underrun causes an abort to be transmitted, and generates an interrupt (state of tur sent to interrupt controller).
sa-1110 developer ? s manual 11-97 peripheral control module 11.10.7 hssp control register 1 hssp control register 1 (hscr1) contains the 8-bit address match value field that is used by the hssp to selectively receive frames. note: a question mark (?) signifies that the reset value of that bit is undefined when the processor has completed its reset cycle. 11.10.7.1 address match value (amv) the 8-bit address match value (amv) field is programmed with an address value that is used to selectively store only the data within receive frames that have the same address value. the address match enable (ame) bit must be set to enable this function. for incoming frames, which have the same address value as the amv field, the frame ? s address, control, and data are stored in the receive fifo. for those that do not, the remainder of the frame is ignored and the receive logic switches to hunt mode, looking for the preamble in the incoming data stream. one special address exists, which is always matched by the address match logic regardless of the value programmed in amv. when address matching is enabled, whenever a frame is received with an address containing all ones (11111111), the value programmed in amv is ignored and the frame data is automatically stored in the receive fifo. the address value is contained within the first byte of data in a frame following the flag. amv can be written at any time and is used for comparison with the next frame, which occurs following its update. 3txe transmit enable. 0 ? hssp transmit logic disabled; control of the txd2 pin is given to the ppc unit if itr=1. 1 ? hssp transmit logic enabled if itr=1. note : a sip is transmitted immediately after the transmitter is enabled (txe = 0 1). 4rxe receive enable. 0 ? hssp receive logic disabled; control of the rxd2 pin is given to the ppc unit if itr =1. 1 ? hssp receive logic enabled if itr=1. 5rie receive fifo interrupt enable. 0 ? receive fifo two- or three-fifths full or more condition does not generate an interrupt (rfs bit ignored). 1 ? receive fifo two- or three-fifths full or more condition generates an interrupt (state of rfs sent to interrupt controller). 6tie transmit fifo interrupt enable. 0 ? transmit fifo half-full or less condition does not generate an interrupt (tfs bit ignored). 1 ? transmit fifo half-full or less condition generates an interrupt (state of tfs sent to interrupt controller). 7ame address match enable. 0 ? disable receiver address match function, store data from all incoming frames in receive fifo. 1 ? enable receiver address match function; do not fifo data unless address recognized or incoming address contains all ones (0hff). 0h 8004 0060 hscr0 read/write 7 6 5 4 3 2 1 0 ame tie rie rxe txe tus lbm itr reset ? ? ? 0 0 ? ? ? (sheet 2 of 2) bits name description
11-98 sa-1110 developer ? s manual peripheral control module note: a question mark (?) signifies that the reset value of that bit is undefined when the processor has completed its reset cycle. the following table shows the address match value field within hssp control register 1. the reset state of amv is unknown (indicated by question marks) and must be initialized before enabling the hssp. note that hscr1 may be written while the hssp is enabled to allow the address match value to be changed during active receive operation. 11.10.8 hssp control register 2 the hssp control register 2 (hscr2) contains two bit-fields that control the polarity of the transmit and receive data pins. note that unlike the rest of the hssp ? s registers, its bits are located in byte 2 of the addressed word (bits 23..16). word reads or writes should be used to access this register. also note that this register resides within the ppc ? s address space. 11.10.8.1 transmit pin polarity select (txp) the transmit pin polarity select (txp) bit is used to select whether data output to the icp ? s transmit pin (txd2) is true or complemented. when txp=0, data output from the uart (low-speed mode), hssp (high-speed mode), or ppc (gpio output mode) is inverted first before being output to the txd2 pin. when txp=1, data output from either the uart, hssp, or ppc to the txd2 pin is true or noninverted. txp is initialized to 1 following reset such that output pin data defaults to true data. note that txp affects the txd2 pin during all modes of operation including hssp, uart, and pcc. the user should ensure that this bit is properly programmed when using serial port 2 for high- or low-speed irda, normal uart, or gpio operation. note that for gpio mode, the user needs to configure txp only when the pin is to be used as an output (ppdr 14=1). when used as a gpio input, txp has no effect on the state of txd2. see the peripheral pin controller chapter. additionally, the user must ensure that the ppc sleep state direction bit for txd2 is inverted from its normal value, if txp=0 indicating inverted data. thus if the user wishes to make txd2 an output in sleep mode, but txp=0 indicating the output is inverted, the ppc should be programmed such that psdr 14=1. likewise, if txp=0 and the user wishes to make txd2 an input in sleep mode, the ppc should be programmed such that psdr 14=0. if txp=1 indicating true data, psdr should be programmed normally. 0h 8004 0064 hscr1 read/write 7 6 5 4 3 2 1 0 amv reset ? ? ? ? ? ? ? ? bits name description 7..0 amv address match value. the 8-bit value used by receiver logic to compare to address of incoming frames. if ame=1 and avm matches the address of the incoming frame, store the frame address, control, and data in receive fifo; if address does not match, ignore the frame and search for the next preamble. note: an address of 0hff (all ones) in the incoming frame automatically generates a match (amv is ignored).
sa-1110 developer ? s manual 11-99 peripheral control module 11.10.8.2 receive pin polarity select (rxp) the receive pin polarity select (rxp) bit is used to select whether data input to the icp ? s receive pin (rxd2) is viewed by the icp as true or complemented. when rxp=0, data input from the rxd2 pin is first inverted before being sent to either the uart (low-speed mode), hssp (high-speed mode), or ppc (gpio input mode). when rxp=1, data input from the rxd2 pin is treated as true data and is not inverted before being sent to either the uart, hssp, or ppc. rxp is initialized to 1 following reset such that input pin data defaults to true data. note that rxp affects the rxd2 pin during all modes of operation including hssp, uart, and pcc. the user should ensure that this bit is properly programmed when using serial port 2 for high- or low-speed irda, normal uart, or gpio operation. note that for gpio mode, the user needs to configure rxp only when the pin is to be used as an input (ppdr 15=0). when used as a gpio output, rxp has no effect on the state of rxd2. also note that, unlike the txp bit, rxp has no effect on the ppc sleep state direction bit for rxd2. psdr 15 should be programmed normally. the following table shows the location of the bits within hssp control register 2. both bits are set to one to ensure serial port 2 ? s pins default to normal ? true ? data operation following a reset of the sa-1110. note that the hssp and uart must be disabled (rxe=txe=0) when changing the state of these bits. also note that reads of reserved bits return zero and writes have no effect. note: a question mark (?) signifies that the reset value of that bit is undefined when the processor has completed its reset cycle. 0h 9006 0028 hscr2 read/write 23 22 21 20 19 18 17 16 reserved rxp txp reserved reset 0 0 0 0 1 1 0 0 bits name description 17..16 ? reserved. 18 transmit pin polarity select. 0 ? data output from the hssp, uart, or ppc is first inverted before being output to txd2. 1 ? data output from the hssp, uart, or ppc to txd2 is true or non-inverted data. 19 receive pin polarity select. 0 ? data input from rxd2 is first inverted before being used by the hssp, uart, or ppc. 1 ? data input from rxd2 to the hssp, uart, or ppc is true or non-inverted data. 23..20 ? reserved.
11-100 sa-1110 developer ? s manual peripheral control module 11.10.9 hssp data register the hssp data register (hsdr) is an 8-bit register corresponding to both the top and bottom entry of the transmit and receive fifos, respectively. when hsdr is read, the lower 8 bits of the bottom entry of the 11-bit receive fifo is accessed. as data enters the top of the receive fifo, bits 8 ? 10 are used as tags to indicate various conditions that occur during reception of each piece of data. the tag bits are transferred down the fifo along with the data byte that encountered the condition. when data reaches the bottom, bit 8 of the bottom fifo entry is automatically transferred to the end-of-frame (eof) flag, bit 9 to the crc error (cre) flag, and bit 10 to the receiver overrun (ror) flag, all within hssp status register 1. the user can read these flags to determine if the value at the bottom of the fifo represents the last byte within the frame or if an error was encountered during reception. after checking the flags, the fifo value can then be read, which causes the data in the next location of the receive fifo to automatically transfer down to the bottom entry and its eof/cre/ror bits to be transferred to the status register. the end/error in fifo (eif) flag is set within status register 0 whenever one or more of the tag bits (8 ? 10) are set within any of the bottom eight entries of the receive fifo and is cleared when no error bits are set in the bottom eight entries of the fifo. when eif is set, an interrupt is generated and receive fifo dma requests are disabled so that the user can manually empty the fifo, always checking the end-of-frame, crc error, and overrun error flags in status register 1 first before removing each data value from the fifo. after each entry is removed, the user should check the eif bit to see if any set end or error tag remains, and repeat the procedure until all set tags are flushed from the bottom eight entries of the fifo. once eif is cleared, servicing of the receive fifo by the dma controller is automatically reenabled. when hsdr is written, the topmost entry of the 8-bit transmit fifo is accessed. after a write, data is automatically transferred down to the lowest location within the transmit fifo, which does not already contain valid data. data is removed from the bottom of the fifo one piece at a time by the transmit logic, encoded using the 4ppm modulation technique, loaded into the transmit serial shifter, then serially shifted out onto the txd2 pin.
sa-1110 developer ? s manual 11-101 peripheral control module the following table shows the bit locations corresponding to the data field, end-of-frame bit as well as the cyclic redundancy check and receiver overrun error bits within the hssp data register. note that both fifos are cleared when the sa-1110 is reset, the transmit fifo is cleared when txe=0, and the receive fifo is cleared when rxe=0. 0h 8004 006c hsdr read/write 10 9 8 7 6 5 4 3 2 1 0 ror cre eof bottom of receive fifo data reset 0 0 0 0 0 0 0 0 0 0 0 read access note: ror, cre, eof are not read, but rather are transferred to corresponding status bits in the hssp status register 1 (hssr1) each time a new data value is transferred to hsdr. 7 6 5 4 3 2 1 0 top of transmit fifo data reset 0 0 0 0 0 0 0 0 write access bits name description 7..0 data top/bottom of transmit/receive fifo data. read ? bottom of receive fifo. write ? top of transmit fifo. 8eof end of frame. 0 ? the last byte of the frame has not been encountered. 1 ? the data value at the bottom of the receive fifo represents the last byte of the frame. note: each time an 11-bit value reaches the bottom of the receive fifo, bit 8 from the last fifo entry is transferred to the eof bit in hssr1. 9 cre crc error. 0 ? crc not encountered yet, or the crc value calculated on the incoming data matched the received crc value. 1 ? the crc value calculated on the incoming data did not match the received crc value. note: each time an 11-bit value reaches the bottom of the receive fifo, bit 9 from the last fifo entry is transferred to the cre bit in hssr1. 10 ror receiver overrun. 0 ? no receiver overrun has been detected. 1 ? receive logic attempted to place data into receive fifo while it was full; one or more data values after the data value at the bottom of the receive fifo were lost. note: each time an 11-bit value reaches the bottom of the receive fifo, bit 10 from the last fifo entry is transferred to the ror bit in hssr1.
11-102 sa-1110 developer ? s manual peripheral control module 11.10.10 hssp status register 0 hssp status register 0 (hssr0) contains bits that signal the transmit fifo service request, receive fifo service request, receiver abort, transmit fifo underrun, framing error, and the end/error in receive fifo conditions. each of these hardware-detected events signal an interrupt request to the interrupt controller. a bit that can cause an interrupt signals the interrupt request as long as the bit is set. once the bit is cleared, the interrupt is cleared. read/write bits are called status bits; read-only bits are called flags. status bits are referred to as ? sticky ? (once set by hardware, must be cleared by software). writing a one to a sticky status bit clears it; writing a zero has no effect. read-only flags are set and cleared by hardware; writes have no effect. additionally, some bits that cause interrupts have corresponding mask bits in the control registers and are indicated in the following sections. note that the user has the ability to mask all hssp interrupts by clearing bit 16 within the interrupt controller mask register (icmr). 11.10.10.1 end/error in fifo status (eif) (read-only, nonmaskable interrupt) the end/error in fifo flag (eif) is a read-only bit that is set when any tag bits (8 through 10) are set within the bottom eight entries of the receive fifo and is cleared when no tag bits are set within the bottom eight entries of the fifo. when eif is set, an interrupt is signalled and dma requests to empty the receive fifo are disabled until eif is cleared. to discover which fifo entry contains the end-of-frame or an error condition, the user should check the state of the eof, cre, and ror bits (described in the following sections), then read the corresponding value from the hsdr. this procedure should be repeated until eif is cleared because set flag bits that are present within any of the eight lowest entries in the receive fifo can set eif. once all tags are cleared from the bottom eight entries of the receive fifo, eif is automatically cleared, which in turn, clears the interrupt and reenables receive fifo dma requests. 11.10.10.2 transmit underrun status (tur) (read/write, maskable interrupt) the transmit underrun status bit (tur) is set when the transmit logic attempts to fetch data from the transmit fifo after it has been completely emptied. when an underrun occurs, the transmitter takes one of two actions. when the transmit underrun select bit is clear (tus=0), the transmitter ends the frame by shifting out the crc that is calculated continuously on outgoing data, followed by a stop flag and sip pulse. when tus=1, the transmitter is forced to transmit an abort and continues to transmit chips containing all zeros (0000) until valid data is again available within the fifo. once data resides within the bottom entry of the transmit fifo, a new data frame is initiated by transmitting 16 preambles and a start flag followed by the transmission of data from the fifo. when the tur bit is set, an interrupt request is made unless it is masked. when tus=0, the interrupt is masked; when tus=1, it is enabled. note that underruns are not generated when the hssp transmitter is first enabled and is in the idle state (continuously transmits flags). 11.10.10.3 receiver abort status (rab) (read/write, nonmaskable interrupt) the receiver abort status bit (rab) is set when an abort is detected during receipt of an incoming frame. an abort is signalled when two or more chips that do not contain any pulses (0000) or chips containing 0011, 1001, 1010, or 0101(invalid chips not contained within the stop flag) are detected after a valid start flag has been detected but before a complete stop flag has been received (an incorrect chip in the stop flag generates an abort as well). when an abort is received, the eof tag is set in the fifo entry that corresponds to the last piece of data received before the frame was aborted. the receiver then enters hunt mode, searching for the preamble.
sa-1110 developer ? s manual 11-103 peripheral control module 11.10.10.4 transmit fifo service request flag (tfs) (read-only, maskable interrupt) the transmit fifo service request flag (tfs) is a read-only bit that is set when the transmit fifo is nearly empty and requires service to prevent an underrun. tfs is set any time the transmit fifo has eight or fewer entries of valid data (half-full or less), and is cleared when it has nine or more entries of valid data. when the tfs bit is set, an interrupt request is made unless the transmit fifo interrupt request mask (tie) bit is cleared. the state of tfs is also sent to the dma controller, and can be used to signal a dma service request. note that tie has no effect on the generation of the dma service request. after the dma or cpu fills the fifo, such that eight or more locations are filled within the transmit fifo, the tfs flag (and the service request and/or interrupt) is automatically cleared. 11.10.10.5 receive fifo service request flag (rfs) (read-only, maskable interrupt) the receive fifo service request flag (rfs) is a read-only bit that is set when the receive fifo is nearly filled and requires service to prevent an overrun. the amount of data that causes rfs to be set is nondeterministic. however, the range in which rfs will be set is guaranteed. rfs is set at some point when the receive fifo is two- to three-fifths full (or more). the hssp ? s fifos are self-timed to reduce cost and save power. as a result, the depth at which the receive fifo service request is generated is variable. this is the reason the receive fifo is 20 entries deep instead of 16 like the transmit fifo. at which entry in the fifo the request is actually triggered is dependent on ic process, operating temperature, and so on. the receive fifo is designed to signal the rfs bit to be set when it contains 12 entries of valid data. however, because of the variability of the self-timed logic, rfs may also be set when 11, 10, or 9 entries of valid data are present within the fifo. likewise, under normal circumstances, rfs is cleared when the receive fifo has 11 remaining entries of valid data. however, again due to variations, rfs may be cleared when 10 or 9 entries of data remain. when the rfs bit is set, a dma service request is made. an interrupt request is also made unless the receive fifo interrupt request mask (rie) bit is cleared. even though more than eight entries of data may exist within the receive fifo, the user must configure the dma burst size to eight words. if programmed i/o is used to service the receive fifo, a maximum of eight words may be removed without checking if data is valid. after this point, the receive fifo not empty (rne) flag must be polled before each read to see if more data remains. after the dma or cpu empties the fifo such that nine or more empty locations are available within the receive fifo, the rfs flag (as well as the dma and interrupt request) is automatically cleared.
11-104 sa-1110 developer ? s manual peripheral control module 11.10.10.6 framing error status (fre) (read/write, nonmaskable interrupt) the framing error status (fre) bit is set when a frame alignment error is detected by the receive logic. a frame alignment error is detected on received data when a preamble is followed by something other than another preamble or a start flag. the following table shows the bit locations corresponding to the status and flag bits within hssp status register 0. note that the reset state of all writable status bits is unknown (indicated by question marks) and must be cleared (by writing a one to them) before enabling the hssp. also note that writes to reserved bits are ignored and reads return zeros. note: a question mark (?) signifies that the reset value of that bit is undefined when the processor has completed its reset cycle. 0h 8004 0074 hssr0 read/write and read-only 7 6 5 4 3 2 1 0 reserved fre rfs tfs rab tur eif reset 0 0 ? 0 0 ? ? ? bits name description 0eif end/error in fifo (read-only). 0 ? bits 8 ? 10 are not set within any of the eight bottom entries of the receive fifo. receive fifo dma service requests are enabled. 1 ? one or more tag bits (8 ? 10) are set within one or more of the bottom eight entries of the receive fifo. request interrupt, disable receive fifo dma service requests. 1tur transmit fifo underrun. 0 ? transmit fifo has not experienced an underrun. 1 ? transmit logic attempted to fetch data from transmit fifo while it was empty; interrupt request signalled if not masked (if tus=1). 2rab receiver abort. 0 ? no abort has been detected for the incoming frame. 1 ? abort detected during receipt of incoming frame. two or more chips containing no pulses (0000) detected on receive pin. eof bit set in receive fifo next to last piece of ? good ? data received before the abort, interrupt requested. 3tfs transmit fifo service request (read-only). 0 ? transmit fifo is more than half-full (nine or more entries filled) or transmitter disabled. 1 ? transmit fifo is half-full or less (eight or fewer entries filled) and transmitter operation is enabled. dma service request signalled; interrupt request signalled if not masked (if tie=1). 4rfs receive fifo service request (read-only). 0 ? receive fifo contains 11 or fewer entries of data or receiver disabled. 1 ? receive fifo is two- to three-fifths full (contains 9, 10, 11, or 12 entries of data) or more, and receiver operation is enabled. dma service request signalled; interrupt request signalled if not masked (if rie=1). 5fre framing error. 0 ? no framing errors encountered in the receipt of this data. 1 ? framing error occurred; preamble followed by something other than another preamble or start flag, request interrupt. 7..6 ? reserved.
sa-1110 developer ? s manual 11-105 peripheral control module 11.10.11 hssp status register 1 hssp status register 1 (hssr1) contains flags that indicate when the receiver is synchronized, the transmitter is active, the transmit fifo is not full, the receive fifo is not empty, and when an end-of-frame, crc error, or underrun error has occurred. all bits within hssr1 are read-only and noninterruptible. 11.10.11.1 receiver synchronized flag (rsy) (read-only, noninterruptible) the receiver synchronized (rsy) flag is a read-only bit that is set when the receiver is synchronized with the incoming data stream, and is cleared when the receive logic is in hunt mode (looking for the preamble to achieve byte and frame synchronization), or the receiver is disabled (rxe=0). this bit does not request an interrupt. 11.10.11.2 transmitter busy flag (tby) (read-only, noninterruptible) the transmitter busy (tby) flag is a read-only bit that is set when the transmitter is actively transmitting a frame (address, control, data, crc, start or stop flag), and is cleared when the transmitter is idle (transmitting preambles) or the transmitter is disabled (txe=0). this bit does not request an interrupt. 11.10.11.3 receive fifo not empty flag (rne) (read-only, noninterruptible) the receive fifo not empty flag (rne) is a read-only bit that is set whenever the receive fifo contains one or more bytes of valid data and is cleared when it no longer contains any valid data. this bit can be polled when using programmed i/o to remove remaining bytes of data from the receive fifo because dma service and cpu interrupt requests are made only when 12, 11, 10, or 9 bytes reside within the fifo. data will remain after each service request as well as at the end of a frame. this bit does not request an interrupt. 11.10.11.4 transmit fifo not full flag (tnf) (read-only, noninterruptible) the transmit fifo not full flag (tnf) is a read-only bit that is set whenever the transmit fifo contains one or more entries that do not contain valid data and is cleared when the fifo is completely full. this bit can be polled when using programmed i/o to fill the transmit fifo over its halfway mark. this bit does not request an interrupt. 11.10.11.5 end-of-frame flag (eof) (read-only, noninterruptible) the end-of-frame flag (eof) is set when the last byte of data within a frame (including aborted frames) resides within the bottom entry of the receive fifo. the receive fifo contains three tag bits (8, 9, and 10) that are not directly readable. the 8th bit is set at the top of the fifo whenever the last byte within a frame is moved from the receive serial shifter to the top of the receive fifo. this tag travels along with the last data value as it moves down the fifo. each time a data value is transferred to the bottom of the fifo (caused by a read of the previous value), the state of the tag bit is moved from the fifo to the eof bit in the status register. whenever eof is set within the bottom eight entries of the receive fifo, eif is set within hssr0, an interrupt is signalled, and the receive fifo dma request is disabled. after the end/error in fifo (eif) status bit is set, the user should always read hssr1 first to check eof before reading the data value from hsdr because eof corresponds to the current data byte at the bottom of the receive fifo and is updated each time data is removed from the fifo.
11-106 sa-1110 developer ? s manual peripheral control module 11.10.11.6 crc error status (cre) (read-only, noninterruptible) the crc error flag (cre) is set when the crc value calculated by the receive logic does not match the crc value contained within the incoming serial data stream. the receive fifo contains three tag bits (8, 9, and 10) that are not directly readable. whenever a crc error is detected, the 9th bit is set within the top entry of the receive fifo corresponding to the last byte of data within the frame. this tag travels along with the last piece of data from the frame as it moves down the fifo. each time a data value is transferred to the bottom of the fifo (caused by a read of the previous value), the state of the tag bit is moved from the fifo to the cre bit in the status register, indicating whether or not the frame has encountered a crc error. whenever cre is set within the bottom half of the receive fifo, eif is set within hssr0, an interrupt is signalled, and the receive fifo dma request is disabled. after the end/error in fifo (eif) status bit is set, the user should always read hssr1 first to check cre before reading the data value from hsdr because cre corresponds to the current data byte at the bottom of the receive fifo and is updated each time data is removed from the fifo. 11.10.11.7 receiver overrun status (ror) (read-only, noninterruptible) the receiver overrun flag (ror) is set when the receive logic attempts to place data into the receive fifo after it has been completely filled. the receive fifo contains three tag bits (8, 9, and 10) that are not directly readable. the 10th bit is set within the top entry of the receive fifo whenever an overrun occurs. this tag travels along with the last ? good ? data value before the overflow occurred as it moves down the fifo. each time a data value is transferred to the bottom of the fifo (caused by a read of the previous value), the state of the tag bit is moved from the fifo to the ror bit in the status register, indicating that the next value in the fifo is the last ? good ? piece of data before the overflow occurred. whenever ror is set within the bottom eight entries of the receive fifo, eif is set within hssr0, an interrupt is signalled, and the receive fifo dma request is disabled. after the end/error in fifo (eif) status bit is set, the user should always read hssr1 first to check ror before reading the data value from hsdr because ror corresponds to the current data byte at the bottom of the receive fifo and is updated each time data is removed from the fifo.
sa-1110 developer ? s manual 11-107 peripheral control module the following table shows the location of the flags within hssp status register 1. the bits within this register are read-only and do not produce interrupt requests. note that writes to bit 7 are ignored and reads return zero. 0h 8004 0078 hssr1 read-only 7 6 5 4 3 2 1 0 reserved ror cre eof tnf rne tby rsy reset 0 0 0 0 1 0 0 0 bits name description 0rsy receiver synchronized flag (read-only). 0 ? receiver is in hunt more or is disabled. 1 ? receiver logic is synchronized with the incoming data (no interrupt generated). 1tby transmitter busy flag (read-only). 0 ? transmitter is idle (continuous preambles) or disabled. 1 ? transmit logic is currently transmitting a frame (address, control, data, crc, or start/stop flag); no interrupt generated. 2 rne receive fifo not empty (read-only). 0 ? receive fifo is empty. 1 ? receive fifo is not empty (no interrupt generated). 3tnf transmit fifo not full (read-only). 0 ? transmit fifo is full. 1 ? transmit fifo is not full (no interrupt generated). 4eof end of frame (read-only). 0 ? current frame has not completed. 1 ? the value at the bottom of the receive fifo is the last byte of data within the frame. 5 cre crc error (read-only). 0 ? no crc check errors encountered in the receipt of data. 1 ? crc calculated on the incoming data. does not match crc value contained within the received frame. 6ror receive fifo overrun (read-only). 0 ? receive fifo has not experienced an overrun. 1 ? receive logic attempted to place data into receive fifo while it was full; the next data value in the fifo is the last piece of ? good ? data before the fifo was overrun. 7 ? reserved.
11-108 sa-1110 developer ? s manual peripheral control module 11.10.12 uart register locations table 11-16 shows the registers associated with the uart block and the physical addresses used to access them. 11.10.13 hssp register locations table 11-17 shows the registers associated with the hssp block and the physical addresses used to access them. table 11-16. uart control, data, and status register locations address name description 0h 8003 0000 utcr0 uart control register 0 0h 8003 0004 utcr1 uart control register 1 0h 8003 0008 utcr2 uart control register 2 0h 8003 000c utcr3 uart control register 3 0h 8003 0010 utcr4 uart control register 4 0h 8003 0014 utdr uart data register 0h 8003 0018 ? reserved 0h 8003 001c utsr0 uart status register 0 0h 8003 0020 utsr1 uart status register 1 0h 8003 0024 ? 0h 8003 005c ? reserved table 11-17. hssp control, data, and status register locations address name description 0h 8004 0060 hscr0 hssp control register 0 0h 8004 0064 hscr1 hssp control register 1 0h 8004 0068 ? reserved 0h 8004 006c hsdr hssp data register 0h 8004 0070 ? reserved 0h 8004 0074 hssr0 hssp status register 0 0h 8004 0078 hssr1 hssp status register 1 0h 8004 007c - 0h 8004 ffff ? reserved note : hscr2 resides within the same address space as the ppc. 0h 9006 0028 hscr2 hssp control register 2
sa-1110 developer ? s manual 11-109 peripheral control module 11.11 serial port 3 ? uart serial port 3 is a general-purpose, full-duplex, universal asynchronous receiver/transmitter (uart) that supports much of the functionality of the 16550 protocol. it can operate at baud rates from 56.25 bps to 230.4 kbps. it supports 7 or 8 bits of data (odd, even, or no parity), one start bit, either one or two stop bits, and can transmit a continuous break signal. an external clock can also be input using gpio pin 20 to synchronously sample and drive data on either edge of the clock as programmed by the user. the external pins dedicated to this interface are txd3 and rxd3. if use of the uart is not required, these pins can be used by the peripheral pin controller (ppc) to perform general- purpose input/output (noninterruptible). an 8-entry x 8-bit fifo is used to buffer outgoing data, and a 12-entry x 11-bit fifo is used to buffer incoming data (3 bits per entry are used to store framing, parity, and receive fifo overrun error flags for each character received). the fifos are filled or emptied using the dma or the cpu. an interrupt is generated when a framing, parity, or receiver overrun error is present within the bottom four entries of the receive fifo, when the transmit fifo is half-empty or the receive fifo is one- to two-thirds full, when a begin and end of break is detected on the receiver, and when the receive fifo is partially full and the receiver is idle for three or more frame periods. modem control signals (rts, cts, dtr, and dsr) are not implemented in this block, but can be implemented using the general-purpose i/o port (gpio) pins. see chapter 9, ? system control module ? . 11.11.1 uart operation following hardware reset, the uart is disabled, which causes the peripheral pin controller (ppc) to assume control of the uart ? s pins. reset causes the ppc to configure all of the peripheral pins as inputs, including the uart ? s transmit (txd3) and receive (rxd3) pins. reset also causes the uart ? s transmit and receive fifos to be flushed (all entries invalidated). before enabling the uart, the user must first clear any writable or ? sticky ? status bits that are set by writing a one to each bit. next, the desired mode of operation is programmed in the control registers. at this point, the user may ? prime ? the transmit fifo by writing up to eight values, or the fifo can remain empty and the transmit fifo dma or interrupt request may be used to trigger its service when the transmitter is enabled. when the uart is enabled, transmission and reception of data can begin on the transmit (txd3) and receive (rxd3) pins. figure 11-28 shows the format of a single uart data frame. figure 11-28. example uart data frame start bit data0 data1 data2 data3 data4 data5 data6 data7 parity bit stop bit 1 stop bit 2 txd3 or rxd3 pin optional optional lsb msb receive data sample counter frequency = 16x bit frequency, each bit sampled on eighth clock.
11-110 sa-1110 developer ? s manual peripheral control module 11.11.1.1 frame format each data frame is between 9 bits and 12 bits long depending on the size of data programmed, if parity is enabled and if a second stop bit is enabled. the frame begins with a start bit that is represented by a high to low transition. next, either 7 bits or 8 bits of data are transmitted, beginning with the least significant bit. an optional parity bit follows, which is set if even parity is enabled and an odd number of ones exist within the data byte, or if odd parity is enabled and the data byte contains an even number of ones. the data frame ends with either one or two stop bits as programmed by the user, which is represented by one or two successive bit periods of a logic one. note that the receiver only tests for one stop bit per frame. 11.11.1.2 baud rate generation the baud or bit rate is derived by dividing down the 3.6864-mhz clock generated by the on-chip pll. the clock is first divided by a programmable number between 1 and 4096, and then by a fixed value of 16. the receive baud clock is synchronized with the data stream using a digital pll each time the start bit is detected on the receive data line. receive data is then sampled halfway through each bit period by counting 8 of the 16 clocks, which are produced before the fixed divide by 16 takes place. (see figure 11-28 .) 11.11.1.3 receive operation the uart receives incoming data by using a serial shifter. it latches the frame, strips it of its start, parity, and stop bits, and then places the data within receive fifo. if parity is enabled, the number of data bits, which is one, is counted as data and is extracted from each frame. parity is then checked by comparing this value to the stripped parity bit. either odd or even parity is checked as specified by the programmer. if a parity error is detected, the parity error bit is set in the fifo entry corresponding to the data value that caused the error. additionally, if a logic zero is detected by the receive logic where a stop bit was expected, the framing error bit is set in the fifo entry corresponding to the errant data. when the fifo fills between one- to two-thirds full, an interrupt or dma request is signalled. if the fifo is completely filled and the receive logic attempts to place additional data within the fifo, the overrun bit is set next to the last byte of data received within the fifo. any data received while the fifo is completely full is discarded. the parity, framing, and overrun error bits are transferred down the receive fifo along with the data that caused the error. whenever any of the four bottom fifo entries contain one or more error bits that are set, an interrupt is generated and receive fifo dma requests are disabled until the error is flushed from the fifo and the status bit that signalled the interrupt is cleared. at this point, the user should use programmed i/o to check the error bits and remove data one piece at a time until the four fifo entries are flushed. each time a data value is transferred to the bottom of the fifo, the state of the parity, framing, and overrun bits within the last fifo entry are automatically transferred to their respective flag bits in the status register. when any of these three flags are set in the uart status register, it indicates that the next data value available within the fifo contains an error. the user must first check the state of these three flags to see if the next value within the fifo contains an error, then read the fifo value. after four values have been removed from the fifo and the errors are identified, the dma is automatically reenabled once the error in fifo bits are removed from the fifo. if the receive fifo contains valid data and three frame periods elapse without the reception of data on rxd3, the receiver idle interrupt is generated. also, if the receive logic detects a null character (all zeros, including the parity bit) followed by a framing error (stop bit is zero as well), the receive logic generates a beginning of break detect, which interrupts the cpu. because breaks can be signalled for long periods of time, after the break is negated and the receive pin transitions high, the receive logic generates an end of break detect, which again interrupts the cpu.
sa-1110 developer ? s manual 11-111 peripheral control module 11.11.1.4 transmit operation the uart transmit logic operates at the same time as the receive logic (full-duplex). data is taken from the transmit fifo; start, parity, and stop bits are added to generate a frame; and the value is loaded into a serial shift register. the contents are shifted out onto the txd3 pin, clocked by the programmed baud clock. when the transmit fifo is emptied more than halfway, an interrupt or dma request is signalled. if the transmit fifo is completely emptied, the transmit line remains high (one) after the last data value is transmitted to indicate the transmitter is idle. the txd3 pin remains high until additional data is written to the transmit fifo. 11.11.1.5 transmit and receive fifos to reduce chip size and power consumption, the uart ? s fifos use self-timed logic (they are not clocked). because of process and environmental variations, the depth at which a service request is triggered to empty the receive fifo is variable. this variation spans a maximum of four fifo entries; the receive fifo service request can be made at four different fifo depths.to compensate for this variability and guarantee that at least four valid entries of data exist within the fifo before generating a service request, an extra four entries have been added to the receive fifo (four entries more than the transmit fifo). the transmit fifo is 8 entries deep and the receive fifo is 12 entries deep. the point at which the receive fifo service request is triggered spans the middle third of the 12-entry fifo. the service request is signalled at a depth from one-third full to two-thirds full (when the fifo contains five, six, seven, or eight entries of data). this service request variation applies only to an empty fifo that is filled (receive fifo). it does not apply to a full fifo that is emptied (transmit fifo). the transmit fifo is guaranteed to signal a service request when it has four or more empty entries and negate the request when the fifo contains five or more entries that are filled. if the dma is used to service either one or both of the uart ? s fifos, the burst size must be set to 4 words even though more than four entries of data may exist within the receive fifo. if programmed i/o is used to service the fifos, a maximum of 4 words may be added to the transmit fifo without checking if more space is available. likewise, a maximum of 4 words may be removed from the receive fifo without checking if more data is available. after this point, the user must poll a set of status bits that indicates if any data remains in the receive fifo or if space is available in the transmit fifo before emptying or filling the fifos any further. 11.11.1.6 cpu and dma register access sizes bit positioning, byte ordering, and addressing of the uart is described in terms of little endian ordering. all uart registers are 8 bits wide and are located in the least significant byte of individual words. the arm peripheral bus does not support byte or half-word operations. all reads and writes of the uart by the cpu should be word ? wide. two separate dedicated dma requests exist for both the transmit and the receive fifo. if the dma controller is used to service the transmit and/or receive fifos, the user must ensure the dma is properly configured to perform byte ? wide accesses, using 4 bytes per burst. 11.11.2 uart register definitions there are seven byte ? wide registers within the uart: four control registers, one data register, and two status registers. the control registers are used to program the baud rate, data length, number of stop bits, and odd or even parity. they are used to receive and transmit sample clock edge type, and to transmit a break. also, they are used to enable or disable transmit and receive operation, parity, use of the sample clock input, and loopback mode. the data register is 8 bits and addresses the top
11-112 sa-1110 developer ? s manual peripheral control module location of the transmit fifo and bottom location of the receive fifo. when it is read, the receive fifo is accessed, and when it is written, the transmit fifo is accessed. the status registers contain bits that signal the transmit fifo service request, receive fifo service request, receiver idle, the begin and end of break detect, and error in fifo conditions. each of these status conditions signal an interrupt request to the interrupt controller. the status registers also flag when the uart is actively transmitting characters, when the transmit fifo is not full, when the receive fifo is not empty, and when a parity, framing, or overrun error was detected for the data value currently located in the bottom entry of the receive fifo (no interrupt generated). 11.11.3 uart control register 0 uart control register 0 (utcr0) contains seven different bit fields that control various functions within the uart. 11.11.3.1 parity enable (pe) the parity enable (pe) bit is used to enable or disable parity checking by the receive data logic as well as parity generation by the transmit logic. when parity is enabled (pe=1), the odd/even parity select (oes) control bit is decoded to determine which type of parity should be checked and generated. the parity of each data frame received is checked. if the parity type programmed in the oes bit does not match the parity of the data received, the parity error (pre) bit is set in the same entry in the receive fifo where the errant data resides. when parity is disabled (pe=0), the parity check and generation logic is disabled, parity bits are not inserted into transmitted frames, and the receive logic expects a stop bit to occur after the msb of each data value is received. 11.11.3.2 odd/even parity select (oes) the odd/even parity select (oes) bit is used to select whether odd or even parity should be used by the transmit and receive logic. when oes=0, odd parity is selected; when oes=1, even parity is selected. when parity is enabled (pe=1), the parity bit is placed after the data ? s msb in each frame. the transmit logic sets or clears the parity bit to make the total number of ones transmitted (including the parity bit) match the parity type programmed using oes (if even parity is selected (oes=1) and there is an odd number of ones in the data to be transmitted, the parity bit is set). the receive data logic counts the number of ones encountered in the incoming data stream (including the parity bit), then strips the parity bit from the data. if the parity type of the frame does not match the parity selected by oes, the parity error bit is set (bit 8) within the fifo entry corresponding to the data that produced the parity error. 11.11.3.3 stop bit select (sbs) the stop bit select (sbs) bit selects whether one or two stop bits should be used in transmission. when sbs=0, one stop bit is inserted in the transmit frame for each character. when sbs=1, two stop bits are inserted. sbs does not affect the uart ? s receive logic. the receiver always checks to make sure there is at least one stop bit per character. 11.11.3.4 data size select (dss) the data size select (dss) bit is programmed to select the size of the data transmitted and received within each frame. data can be 7 or 8 bits in length. when 7-bit data is programmed, the data is right justified within the fifos. the unused bit is zero filled within the receive fifo, and is ignored within the transmit fifo. note that the user must right justify data supplied to the transmit fifo when 7-bit data is selected.
sa-1110 developer ? s manual 11-113 peripheral control module 11.11.3.5 sample clock enable (sce) the sample clock enable (sce) bit is used to enable or disable the use of a clock input from a gpio pin to synchronously sample and drive data to and from the uart. when sce=0, the on-chip 3.6864-mhz pll, the uart ? s programmable baud rate generator, and the receive logic ? s digital pll are used. when sce=1, a clock is input from a gpio pin and is used to synchronously drive both the transmit and receive logic. note that the user must configure the gpio pin as an input by clearing the corresponding bit in the gpio pin direction register (gpdr) and switch control of the gpio pin to the uart by setting the corresponding bit in the gpio alternate function register (gafr). see chapter 9, ? system control module ? . for the receive logic, the rce bit is decoded to select which edge of the input clock is used to latch each bit of the incoming frame. note that the clock is not embedded within the data stream and the digital pll is shut down to conserve power. for the transmit logic, the tce bit is decoded to select which edge of the input clock is used to drive each bit of the outgoing frame. note that the clock driving the programmable baud rate generator is shut down when sce=1 to conserve power. also note that sce does not affect the frame format of data being transmitted and received by the uart. the sa-1110 has a total of three uarts (serial ports 1, 2 and 3). when the external sample clock function is enabled, serial port 1 uses the gpio 18 pin and serial port 3 uses gpio 19. serial port 2 does not support the sample clock function. 11.11.3.6 receive clock edge select (rce) when sce=1, the receive clock edge select (rce) bit is used to select which edge of the clock input from the gpio pin to use (rising or falling) to synchronously sample data from the receive pin. when rce=0, each bit received is sampled on the rising edge of the sample input clock; when rce=1, bits are sampled on the clock ? s falling edge. note that the internal baud rate generator and receive logic ? s digital pll are not used in this mode. rce is ignored when sce=0. 11.11.3.7 transmit clock edge select (tce) when sce=1, the transmit clock edge select (tce) bit is used to select which edge of the clock input from the gpio pin to use (rising or falling) to synchronously drive data onto the transmit pin. when tce=0, each bit transmitted is driven on the rising edge of the sample input clock; when tce=1, bits are driven on the clock ? s falling edge. note that the internal baud rate generator is not used in this mode. tce is ignored when sce=0. the following table shows the bit locations corresponding to the seven different control bit fields within uart control register 0. the uart must be disabled (rxe=txe=0) when changing the state of any bit within this register. the reset state of these control bits is unknown (indicated by question marks) and must be initialized before enabling the uart. note that writes to bit 7 are ignored and reads return zero.
11-114 sa-1110 developer ? s manual peripheral control module 0h 8005 0000 utcr0 read/write 7 6 5 4 3 2 1 0 reserved tce rce sce dss sbs oes pe reset 0 ? ? ? ? ? ? ? bits name description 0pe parity enable. 0 ? parity checking on received data and parity generation on transmitted data is disabled. 1 ? parity checking on received data and parity generation on transmitted data is enabled. 1oes odd/even parity select. 0 ? odd parity checking/generation selected. parity error bit set if even number of ones counted in data field (including the parity bit). 1 ? even parity checking/generation selected. parity error bit set if odd number of ones counted in data field (including the parity bit). 2sbs stop bit select. 0 ? one stop bit transmitted per frame. 1 ? two stop bits transmitted per frame. note: receiver not affected by sbs; always checks for one stop bit. 3dss data size select. 0 ? 7-bit data. 1 ? 8-bit data. note: for 7-bit mode, the data is right justified within the fifo entries, the msbs in the receive fifo are zero filled, and the msbs in the transmit fifo are ignored. 4sce sample clock enable. 0 ? on-chip baud rate generator and digital pll used to transmit and receive asynchronous data. 1 ? a clock is input via gpio pin 20 and is used synchronously to sample receive data and drive transmit data. note: serial port 1 ? s uart uses gpio pin 18 for the sample clock input; serial port 2 does not support the sample clock function. the user must also program the appropriate bits in the gpdr and gafr registers within the system control module. 5 rce receive clock edge select. 0 ? rising edge of clock input on gpio pin 20 used to latch data from the receive pin if sce=1. 1 ? falling edge of clock input on gpio pin 20 used to latch data from the receive pin if sce=1. 6tce transmit clock edge select. 0 ? rising edge of clock input on gpio pin 20 used to drive data onto the transmit pin if sce=1. 1 ? falling edge of clock input on gpio pin 20 used to drive data onto the transmit pin if sce=1. 7 ? reserved.
sa-1110 developer ? s manual 11-115 peripheral control module 11.11.4 uart control registers 1 and 2 uart control register 1 (utcr1) contains the upper 4 bits and utcr2 the lower 8 bits of the baud rate divisor field. 11.11.4.1 baud rate divisor (brd) the 12-bit baud rate divisor (brd) field is used to select the baud or bit rate of the uart. a total of 4096 different baud rates can be selected, ranging from a minimum of 56.25 bps to a maximum of 230.4 kb/ps. the baud rate generator uses the 3.6864-mhz clock generated by the on-chip pll divided by 16 to generate the bit clock. a digital pll is used to synchronize the baud rate of the receiver each time the start bit is detected on the receive pin and each bit of the receive data stream is sampled on the eighth clock of the divide by 16 counter (halfway through the bit period). the resultant baud rate, given a specific brd value or required brd value and given a desired baud rate, can be calculated using the following two respective equations, where brd is the decimal equivalent of the binary value programmed within the bit field: the following tables show the bit locations corresponding to the baud rate divisor field that is split between two 8-bit registers. the upper four bits of brd reside within utcr1 and the lower eight bits reside within utcr2. the uart must be disabled (rxe=txe=0) whenever these registers are written. the reset state of the brd field is unknown (indicated by question marks) and must be initialized before enabling the uart. note that writes to reserved bits are ignored and reads return zeros. baudrate 3.6864 6 10 16 x brd 1 + () -------------------------------------- - = brd 3.6864 6 10 16 x baudrate --------------------------------------- -1 ? = 0h 8005 0004 utcr1 read/write 7 6 5 4 3 2 1 0 reserved brd 11..8 reset 0 0 0 0 ? ? ? ? bits name description 3..0 brd 11..8 baud rate divisor. encoded value (from 0 to 4095) used to generate the baud rate of the uart. baud rate = 3.6864x10 6 /(16x(brd+1)), where brd is a decimal value. 7..4 ? reserved.
11-116 sa-1110 developer ? s manual peripheral control module 11.11.5 uart control register 3 uart control register 3 (utcr3) contains six different bit fields that control various functions within the uart. 11.11.5.1 receiver enable (rxe) the receiver enable (rxe) bit is used to enable and disable all uart receive operations. when rxe=1, the uart receive logic is enabled; when rxe=0, it is disabled. when the receiver is disabled, control of the rxd3 pin is given to the peripheral pin controller (ppc) so that it may be used for general-purpose input and output (noninterruptible). see the section 11.13, ? peripheral pin controller (ppc) ? on page 11-167 for a description of the ppc. it is required that the user first program all other control bits before setting rxe (even the transmit bits). if the rxe bit is cleared to zero while the uart is actively receiving data, reception is stopped immediately and the remaining bits within the receive serial shifter are reset. in addition, all entries within the receive fifo are reset (all other control/status/flag bits remain intact). 11.11.5.2 transmitter enable (txe) the transmitter enable (txe) bit is used to enable and disable all uart transmit operations. when txe=1, uart transmit logic is enabled; when txe=0, it is disabled. when the transmitter is disabled, control of the txd3 pin is given to the peripheral pin controller (ppc) for general-purpose input and output use (noninterruptible). see the section 11.13, ? peripheral pin controller (ppc) ? on page 11-167 for a description of the ppc. it is required that the user first program all other control bits before setting txe (even the receive bits). if the txe bit is cleared to zero while the uart is actively transmitting data, transmission is stopped immediately and the remaining bits within the transmit serial shifter are reset. in addition, all entries within the transmit fifo are reset (all other control/status/flag bits remain intact). 11.11.5.3 break (brk) the break (brk) control bit is used to continuously transmit a break by forcing the transmit pin (txd3) low. when the brk bit is set, the transmit pin is forced low immediately. if the transmitter is actively transmitting data, the remaining bits in the serial shifter continue to be shifted out, but the bits are ignored (not placed on the transmit pin). asserting brk also prevents the transmit logic from fetching any additional data from the transmit fifo once the shifter is empty. the transmit pin remains low until the brk bit is cleared, or alternatively, if the transmitter is disabled (txe=0, or a reset occurs). once brk is negated, transmission starts again. the user must ensure that the brk bit is asserted long enough to cause the off-chip receiver to detect the break condition. the user should also check the transmitter busy (tby) flag in the status register to ensure that no bits remain in the transmitter ? s serial shifter before negating brk. tby is asserted as long as the transmitter is actively 0h 8005 0008 utcr2 read/write 7 6 5 4 3 2 1 0 brd 7..0 reset ? ? ? ? ? ? ? ? bits name description 7..0 brd 7..0 baud rate divisor. encoded value (from 0 to 4095) used to generate the baud rate of the uart. baud rate = 3.6864x10 6 /(16x(brd+1)), where brd is a decimal value.
sa-1110 developer ? s manual 11-117 peripheral control module clocking data through the serial shifter. once the tby bit becomes zero, the brk bit can be negated, and data is once again fetched from the transmit fifo. break does not affect the receive portion of the fifo; normal operation on the receive line continues during the signalling of a break. 11.11.5.4 receive fifo interrupt enable (rie) the receive fifo interrupt enable (rie) bit is used to mask or enable both the receive fifo service request interrupt and receiver idle interrupt. when rie=0, the interrupts are masked and the receive fifo service request (rfs) and receiver idle status (rid) bits are ignored by the interrupt controller. when rie=1, the interrupts are enabled and whenever rfs or rid is set (one), an interrupt request is made to the interrupt controller. note that programming rie=0 does not affect the current state of rfs or rid nor the receive logic ? s ability to set and clear these bits; it only blocks the generation of the interrupt request. also note that rie does not affect generation of the receive fifo dma request that is asserted whenever rfs=1. 11.11.5.5 transmit fifo interrupt enable (tie) the transmit fifo interrupt enable (tie) bit is used to mask or enable the transmit fifo service request interrupt. when tie=0, the interrupt is masked and the state of the transmit fifo service request (tfs) bit is ignored by the interrupt controller. when tie=1, the interrupt is enabled, and whenever tfs is set (one), an interrupt request is made to the interrupt controller. note that programming tie=0 does not affect the current state of tfs nor the transmit fifo logic ? s ability to set and clear tfs; it only blocks the generation of the interrupt request. also note that tie does not affect generation of the transmit fifo dma request that is asserted whenever tfs=1. 11.11.5.6 loopback mode (lbm) the loopback mode (lbm) bit is used to enable and disable the ability of the uart transmit and receive logic to communicate. when lbm=0, the uart operates normally. the transmit and receive data paths are independent and communicate via their respective pins. when lbm=1, the output of the transmit serial shifter is directly connected to the input of the receive serial shifter internally, and control of the txd3 and rxd3 pins is given to the peripheral pin control (ppc) unit. the following table shows the bit location of the bits within uart control register 3. rxe and txe are the only control bits that are reset to a known state to ensure the uart is disabled following a reset of the sa-1110. the reset state of all other control bits is unknown (indicated by question marks) and must be initialized before enabling the uart. note that utcr3 is the only control register that may be written while the uart is enabled. also note that writes to reserved bits are ignored and reads return zeros. 0h 8005 000c utcr3 read/write 7 6 5 4 3 2 1 0 reserved lbm tie rie brk txe rxe reset 0 0 ? ? ? ? 0 0 (sheet 1 of 2) bits name description 0rxe receiver enable. 0 ? uart receive operation disabled; ppc is given control of rxd3 . 1 ? uart receive operation enabled. 1txe transmitter enable. 0 ? uart transmit operation disabled; ppc is given control of txd3 . 1 ? uart transmit operation enabled.
11-118 sa-1110 developer ? s manual peripheral control module 11.11.6 uart data register the uart data register (utdr) is an 8-bit register corresponding to both the top and bottom entries of the transmit and receive fifos, respectively. when utdr is read, the lower 8 bits of the bottom entry of the 10-bit receive fifo are accessed. as data enters the top of the receive fifo, bits 8..10 are used to indicate various error conditions that occur during reception of each piece of data. the error bits are transferred down the fifo along with the value that caused the error. when data reaches the bottom, bit 8 of the bottom fifo entry is automatically transferred to the parity error (pre) flag, bit 9 to the framing error (fre) flag, and bit 10 to the receiver overrun (ror) flag, all within the uart status register. the user can read these flags to determine if the value at the bottom of the fifo encountered an error during reception. after checking the flags, the fifo value can then be read, which causes the data in the next location of the receive fifo to automatically be transferred down to the bottom entry and its error bits to be transferred to the status register. the error in fifo (eif) flag bit is set whenever one or more of the error bits (8..10) is set within any of the bottom four entries of the receive fifo and is cleared when no error bits are set in the bottom four entries of the fifo. when eif is set, an interrupt is generated and receive fifo dma requests are disabled so that the user can manually empty the fifo, always checking the parity, framing, and overrun flags in the status register first before removing the data values from the fifo. after each entry is removed, the user should check the eif bit to see if any errors remain, and repeat the procedure until all errors are flushed from the fifo. once eif is cleared, servicing of the receive fifo by the dma controller is automatically reenabled. 2brk break. 0 ? uart in normal operation. 1 ? force txd3 low (all bits in the frame are a zero) to generate a break. 3rie receive fifo interrupt enable. 0 ? receive fifo one- to two-thirds full (or more) and receiver idle conditions do not generate an interrupt (rfs and rid bit ignored). 1 ? receive fifo one- to two-thirds full (or more) and receiver idle conditions generate an interrupt (state of rfs and rid sent to interrupt controller). 4tie transmit fifo interrupt enable. 0 ? transmit fifo half-full or less condition does not generate an interrupt (tfs bit ignored). 1 ? transmit fifo half-full or less condition generates an interrupt (state of tfs sent to interrupt controller). 5lbm loopback mode. 0 ? normal serial port operation enabled. 1 ? output of transmit serial shifter is connected to input of receive serial shifter internally and control of txd3 and rxd3 pins is given to the ppc unit. 7..6 ? reserved. 0h 8005 000c utcr3 read/write 7 6 5 4 3 2 1 0 reserved lbm tie rie brk txe rxe reset 0 0 ? ? ? ? 0 0 (sheet 2 of 2) bits name description
sa-1110 developer ? s manual 11-119 peripheral control module when utdr is written, the topmost entry of the 8-bit transmit fifo is accessed. after a write, data is automatically transferred down to the lowest location within the transmit fifo that does not already contain valid data. data is removed from the bottom of the fifo one piece at a time by the transmit logic and is loaded into the transmit serial shifter along with start and stop bits (and the optional parity and second stop bits), then is serially shifted out onto the txd3 pin at the programmed baud rate. note: there may be a delay between the writing of data in the transit fifo and the assertion of tby in utsr1. when the tby status bit is set, there is some propagation delay for data moving through the fifo and getting to the serial shifter. the programmer should either use the interrupt functionality of the uart module or wait for a 0 to 1 transition and then a 1 to 0 transition of tby to ensure that the data is transmitted. the following table shows the bit locations corresponding to the data field, parity, framing, and receiver overrun error bits within the uart data register. note that both fifos are cleared when the sa-1110 is reset, the transmit fifo is cleared when writing txe=0, and the receive fifo is cleared when writing rxe=0. 0h 8005 0014 utdr read/write 10 9 8 7 6 5 4 3 2 1 0 ror fre pre bottom of receive fifo data reset 0 0 0 0 0 0 0 0 0 0 0 read access note: ror, fre, pre are not read, but rather are transferred to corresponding status bits in utsr1 each time a data value is transferred to utdr. 7 6 5 4 3 2 1 0 top of transmit fifo data reset 0 0 0 0 0 0 0 0 write access bits name description 7..0 data top/bottom of transmit/receive fifo data. read ? bottom of receive fifo data. write ? top of transmit fifo data. 8pre parity error. 0 ? no parity errors encountered in the receipt of this data (or parity disabled). 1 ? parity error encountered in the receipt of this data. note: each time an 11-bit value reaches the bottom of the receive fifo, bit 8 from the last fifo entry is transferred to the pre bit in utsr1. 9fre framing error. 0 ? stop bit for this frame was a one. 1 ? stop bit for this frame was a zero. note: each time an 11-bit value reaches the bottom of the receive fifo, bit 9 from the last fifo entry is transferred to the fre bit in utsr1. 10 ror receiver overrun. 0 ? no receiver overrun has been detected. 1 ? receive logic attempted to place data into receive fifo while it was full; one or more data values following this entry were lost. note: each time an 11-bit value reaches the bottom of the receive fifo, bit 10 from the last fifo entry is transferred to the ror bit in utsr1.
11-120 sa-1110 developer ? s manual peripheral control module 11.11.7 uart status register 0 uart status register 0 (utsr0) contains bits that signal the transmit fifo interrupt request, receive fifo interrupt request, receiver idle detect, the begin and end of receiver break detect conditions, and the error in receive fifo condition. each of these hardware-detected events signals an interrupt request to the interrupt controller. interruptible status bits signal an interrupt requested as long as the bit is set. once the bit is cleared, the interrupt is cleared. read/write bits are called status bits, read-only bits are called flags. status bits are referred to as ? sticky ? (once set by hardware, must be cleared by software). writing a one to a sticky status bit clears it; writing a zero has no effect. read-only flags are set and cleared by hardware; writes have no effect. additionally, some bits that cause interrupts have corresponding enable/mask bits in the control registers and are indicated in the following section headings. note that the user has the ability to mask all uart interrupts by clearing bit 17 within the interrupt controller mask register (icmr). see the section 9.2, ? interrupt controller ? on page 9-11 . 11.11.7.1 transmit fifo service request flag (tfs) (read-only, maskable interrupt) the transmit fifo service request flag (tfs) is a read-only bit that is set when the transmit fifo is nearly empty and requires service to prevent an underrun. tfs is set any time the transmit fifo has four or fewer entries of valid data (half-full or less), and is cleared when it has five or more (more than half-full) entries of valid data. when the tfs bit is set, a dma service request is made. an interrupt request is also made unless the transmit fifo interrupt request mask (tie) bit is cleared. after the dma or cpu fills the fifo such that five or more locations are filled within the transmit fifo, the tfs flag (as well as the dma and interrupt request) is automatically cleared. 11.11.7.2 receive fifo service request flag (rfs) (read-only, maskable interrupt) the receive fifo service request flag (rfs) is a read-only bit that is set when the receive fifo is nearly filled and requires service to prevent an overrun. the amount of data that causes rfs to be set is nondeterministic. however, the range in which rfs will be set is guaranteed. rfs is set at some point when the receive fifo is one- to two-thirds full (or more). the uart ? s fifos are self-timed to reduce cost and save power. as a result, the depth at which the receive fifo service request is generated is variable. this is the reason the receive fifo is 12 entries deep instead of eight like the transmit fifo. at which entry in the fifo the request is actually triggered is dependent on ic process, operating temperature, and so on. the receive fifo is designed to signal the rfs bit to be set when it contains eight entries of valid data. however, because of the variability of the self-timed logic, rfs may also be set when seven, six, or five entries of valid data are present within the fifo. likewise, under normal circumstances, rfs is cleared when the receive fifo has seven remaining entries of valid data. however, again due to variations, rfs may be cleared when six, five, or four entries of data remain. when the rfs bit is set, a dma service request is made. an interrupt request is also made unless the receive fifo interrupt request enable (rie) bit is cleared. even though more than four entries of data may exist within the receive fifo, the user must configure the dma burst size to 4 words. if programmed i/o is used to service the receive fifo, a maximum of 4 words may be removed without checking if data is valid. after this point, the receive fifo not empty (rne) flag must be polled before each read to see if more data remains. after the dma or cpu empties the fifo such that five or more empty locations are available within the receive fifo, the rfs flag (as well as the dma and interrupt request) is automatically cleared.
sa-1110 developer ? s manual 11-121 peripheral control module 11.11.7.3 receiver idle status (rid) (read/write, maskable interrupt) the receiver idle status bit (rid) is set when the receiver is enabled (rxe=1), the receive fifo is not empty (contains at least one entry of data), and three frame periods elapse without any data having being received. when rid is set, an interrupt request is made unless the receive fifo interrupt request mask (rie) bit is cleared. 11.11.7.4 receiver begin of break status (rbb) (read/write, nonmaskable interrupt) the receiver begin of break status bit (rbb) is set when the receive logic detects a null character (contains all zeros, including the parity bit), followed by a framing error, which indicates the start bit is zero. in other words, a begin of break is detected when the receive line is held low for one frame duration (whatever size the frame is programmed to). when rbb is set, an interrupt is signalled, a single null frame is placed in the receive fifo, the framing error bit is set, and all subsequent null frames with framing errors are ignored (not placed within the fifo). after rbb is cleared by the user, it cannot be set again until the receiver end of break status (reb) bit is set. this interlock is used to prevent added null characters from entering the receive fifo, and also allows the user to clear the rbb bit (clearing the interrupt) and wait for the receiver end of break interrupt (described in the next section). this interlock is cleared when reb is set, when rxe is cleared, or when the sa-1110 is reset. 11.11.7.5 receiver end of break status (reb) (read/write, nonmaskable interrupt) the receiver end of break status bit (reb) is set when the receive pin transitions high (rising edge) and the rbb interlock is currently set (described in the preceding section). in other words, an end of break is detected after a begin of break is detected and the receive line transitions from low to high (indicating a new frame is about to occur or the receiver is entering the idle state). when reb is set, an interrupt is signalled, and the rbb interlock is cleared, allowing any future data frame to be stored to the receive fifo. after the bit is cleared, it cannot be set again until the receiver begin of break status (rbb) bit is once again set. 11.11.7.6 error in fifo flag (eif) (read-only, nonmaskable interrupt) the error in fifo flag (eif) is a read-only bit that is set when any error bits (8 through 10) are set within the bottom four entries of the receive fifo and is cleared when no error bits are set within the bottom four entries of the fifo. when eif is set, an interrupt is signalled and dma requests to empty the receive fifo are disabled until eif is cleared. to discover the source of the errors, the user should check the state of the fre, pre, and ror bits in utsr1, then read the corresponding value from utdr. this procedure should be repeated until eif is cleared because errors that are present within any of the four lowest entries in the receive fifo will set eif. once all error tags are cleared from the bottom half of the receive fifo, eif is automatically cleared, which in turn, clears the interrupt and reenables the receive fifo dma request.
11-122 sa-1110 developer ? s manual peripheral control module the following table shows the bit locations corresponding to the status bits within uart status register 0. note that the reset state of all writable status bits is unknown (indicated by question marks) and must be cleared (by writing a one to them) before enabling the uart. also note that writes to reserved bits are ignored and reads return zeros. 0h 8005 001c utsr0 read/write and read-only 7 6 5 4 3 2 1 0 reserved eif reb rbb rid rfs tfs reset 0 0 0 ? ? ? 0 0 bits name description 0tfs transmit fifo service request (read-only). 0 ? transmit fifo is more than half-full (five or more entries filled) or transmitter disabled. 1 ? transmit fifo is half-full (four or fewer entries filled) and transmitter operation is enabled, dma service request signalled, and interrupt request signalled if not masked (if tie=1). 1rfs receive fifo service request (read-only). 0 ? receive fifo contains seven or fewer entries of data or receiver disabled. 1 ? receive fifo is one- to two-thirds full (contains 5, 6, 7, or 8 entries of data) or more, and receiver operation is enabled, dma service request signalled, and interrupt request signalled if not masked (if rie=1). 2rid receiver idle. 0 ? receiver is busy, receive fifo is empty, or receiver is disabled. 1 ? receiver is enabled, receive fifo not empty, 3 frame times elapsed without receiving data, request interrupt. 3rbb receiver begin of break. 0 ? no break detected. 1 ? null character followed by parity and stop bits containing zeroes received, request interrupt. note: setting this bit allows the setting of reb, and also prevents further null characters with framing errors from being stored in the receive fifo (only one stored). 4reb receiver end of break. 0 ? no end of break detected. 1 ? beginning of break was detected (interlock set) and a rising edge detected on the receive pin, request interrupt. note: setting of this bit allows the setting of rbb, and also allows characters to once again be stored in the receive fifo. 5eif error in fifo (read-only). 0 ? bits 8..10 are not set within any of the four bottom entries of the receive fifo, receive fifo dma service requests are enabled. 1 ? one or more error bits (8..10) are set within one or more of the bottom four entries of the receive fifo, request interrupt, disable receive fifo dma service requests. 7..6 ? reserved.
sa-1110 developer ? s manual 11-123 peripheral control module 11.11.8 uart status register 1 uart status register 1 (utsr1) contains flags that indicate when the uart is actively transmitting characters, that the transmit fifo is not full, that the receive fifo is not empty, and when parity, framing, overrun, and underrun errors have occurred. all bits within utsr1 are read-only and are noninterruptible. 11.11.8.1 transmitter busy flag (tby) (read-only, noninterruptible) the transmitter busy (tby) flag is a read-only bit that is set when the transmitter is actively processing data for transmission (the serial shifter contains data), and is cleared when the transmitter is idle or is disabled (txe=0). this bit does not request an interrupt. 11.11.8.2 receive fifo not empty flag (rne) (read-only, noninterruptible) the receive fifo not empty flag (rne) is a read-only bit that is set when the receive fifo contains one or more bytes of valid data and is cleared when it no longer contains any valid data. this bit can be polled when using programmed i/o to remove remaining bytes of data from the receive fifo because dma service and cpu interrupt requests are made only when 8, 7, 6, or 5 bytes reside within the fifo. this bit does not request an interrupt. 11.11.8.3 transmit fifo not full flag (tnf) (read-only, noninterruptible) the transmit fifo not full flag (tnf) is a read-only bit that is set when the transmit fifo contains one or more entries that do not contain valid data and is cleared when the fifo is completely full. this bit can be polled when using programmed i/o to fill the transmit fifo over its halfway mark. this bit does not request an interrupt. 11.11.8.4 parity error flag (pre) (read-only, noninterruptible) the parity error flag (pre) is set when parity is enabled (pe = 1), and the parity type programmed using oes does not correspond to the parity check of the incoming serial data stream, which is calculated by the receive logic. the parity error bit is set when pe=1, oes=0, and utdr 7:0, and the incoming parity bit contain an even number of ones, or pe=1, oes=1, and utdr 7:0, and the incoming parity bit contain an odd number of ones. the receive fifo contains three bits (8, 9, and 10) that are not directly readable. the 8th bit in the fifo is set at the top of the fifo whenever a byte of data that incurs a parity error is moved from the receive serial shifter to the top of the receive fifo. this tag travels along with the errant data value as it moves down the fifo. each time a data value is transferred to the bottom of the fifo (caused by a read of the previous value), the state of this bit is moved from the fifo to the pre bit in the status register. after the error in fifo (eif) status bit is set, the user should always read utsr1 first to check pre before reading the data value from udr because pre corresponds to the current data byte at the bottom of the receive fifo and is updated each time data is removed from the fifo.
11-124 sa-1110 developer ? s manual peripheral control module 11.11.8.5 framing error flag (fre) (read-only, noninterruptible) the framing error status bit (fre) is set when the stop bit within a frame of incoming serial data is a zero instead of a one. the receive fifo contains three bits (8, 9, and 10) that are not directly readable. the 9th bit in the fifo is set at the top of the fifo whenever a byte of data that incurs a framing error is moved from the receive serial shifter to the top of the receive fifo. this tag travels along with the errant data value as it moves down the fifo. each time a data value is transferred to the bottom of the fifo (caused by a read of the previous value), the state of this bit is moved from the fifo to the fre bit in the status register. after the error in fifo (eif) status bit is set, the user should always read utsr1 first to check fre before reading the data value from udr because fre corresponds to the current data byte at the bottom of the receive fifo and is updated each time data is removed from the fifo. 11.11.8.6 receiver overrun flag (ror) (read-only, noninterruptible) the receiver overrun status bit (ror) is set when the receive logic attempts to place data into the receive fifo after it has been completely filled. the receive fifo contains three bits (8, 9, and 10) that are not directly readable. the 10th bit in the fifo is set within the top entry of the receive fifo whenever an overrun occurs. this tag travels along with the last ? good ? data value before the overflow occurred as it moves down the fifo. each time a data value is transferred to the bottom of the fifo (caused by a read of the previous value), the state of this bit is moved from the fifo to the ror bit in the status register, indicating that the next value in the fifo is the last ? good ? piece of data before the overflow occurred. after the error in fifo (eif) status bit is set, the user should always read utsr1 first to check ror before reading the data value from udr because ror corresponds to the current data byte at the bottom of the receive fifo and is updated each time data is removed from the fifo.
sa-1110 developer ? s manual 11-125 peripheral control module the following table shows the bit locations corresponding to the flag bits within uart status register 1. note that these flags do not generate interrupts, all bits are read-only, writes are ignored, and reads of reserved bits return zeros. 0h 8005 0020 utsr1 read-only 7 6 5 4 3 2 1 0 reserved ror fre pre tnf rne tby reset 0 0 0 ? ? ? 0 0 bits name description 0tby transmitter busy flag (read-only). 0 ? transmitter is idle or uart is disabled. 1 ? transmit logic is currently transmitting a frame (data within the serial shifter); no interrupt generated. 1 rne receive fifo not empty (read-only). 0 ? receive fifo is empty. 1 ? receive fifo is not empty (no interrupt generated). 2tnf transmit fifo not full (read-only). 0 ? transmit fifo is full. 1 ? transmit fifo is not full (no interrupt generated). 3pre parity error (read-only). 0 ? no parity errors encountered in the receipt of the next data value in the fifo (or parity disabled). 1 ? parity error encountered in the receipt of the next data value in the fifo (no interrupt generated). 4fre framing error (read-only). 0 ? stop bit for the next frame in the fifo was a one. 1 ? stop bit for the next frame in the fifo was a zero (no interrupt generated). 5ror receive fifo overrun (read-only). 0 ? receive fifo has not experienced an overrun. 1 ? receive logic attempted to place data into receive fifo while it was full, the next data value in the fifo is the last piece of ? good ? data before the fifo was overrun (no interrupt generated). 7..6 ? reserved.
11-126 sa-1110 developer ? s manual peripheral control module 11.11.9 uart register locations table 11-18 shows the registers associated with serial port 3 and the physical addresses used to access them. 11.12 serial port 4 ? mcp / ssp serial port 4 contains two separate full-duplex synchronous serial interfaces. the multimedia communications port (mcp) provides an interface to the philips ucb1100 and ucb1200 codecs. both devices have an audio codec, a telecom codec, a touch-screen interface, four general-purpose analog-to-digital converter inputs, and ten programmable digital i/o lines. the mcp interface is used by the sa-1110 both to input and output digital data to and from the codec, and to configure and acquire status information from the codecs ? 16 registers. the synchronous serial port (ssp) is used to interface to a variety of analog-to-digital converters, audio and telecom codecs, memory chips, and keypad controllers as well as other miscellaneous serial devices. the ssp supports the national microwire and texas instruments * synchronous serial protocols as well as a subset of the motorola * serial peripheral interface (spi) protocol. in mcp mode, serial port 4 controls communication between the sa-1110 and either the ucb1100 or ucb1200. the mcp produces two 64-bit subframes per frame (totalling 128 bits per frame) using a bit clock and frame synchronization signal. data is communicated full-duplex via a separate transmit and receive data line. selecting the on-chip clock, a bit clock frequency of either 9.585 mbps or 11.981 mbps can be programmed. alternatively, gpio pin 21 can be used to input a bit clock from an off-chip source. this feature allows users to select a frame rate that is an exact multiple of the desired audio/telecom sample rate. the mcp communicates to the codec in the first of the two subframes. the second subframe is used in high-end applications to communicate with a second stereo codec; however, this feature is not supported by the mcp. each 64-bit subframe contains seven different fields of information. these fields include: audio conversion data, telecom conversion data, data valid flags, control register address, control register data, and read/write control. both transmit and receive data contains these seven fields. the transmit frame contains data for d-to-a conversion as well as address, data, and control signals to write to or read from the codec ? s registers, and the receive frame contains a-to-d samples and the data returned from a read of a codec register. table 11-18. serial port 3 control, data, and status register locations address name description 0h 8005 0000 utcr0 uart control register 0 0h 8005 0004 utcr1 uart control register 1 0h 8005 0008 utcr2 uart control register 2 0h 8005 000c utcr3 uart control register 3 0h 8005 0010 ? reserved 0h 8005 0014 utdr uart data register 0h 8005 0018 ? reserved 0h 8005 001c utsr0 uart status register 0 0h 8005 0020 utsr1 uart status register 1 0h 8005 0024 ? 0h 8005 ffff ? reserved
sa-1110 developer ? s manual 11-127 peripheral control module both the mcp and the off-chip codec contain programmable 7-bit divisors, one each for the telecom and audio data. these values are used to divide the bit clock to generate a desired sampling frequency. when the codec is enabled, the divisor pairs are synchronously transferred to their respective modulus registers within the mcp and off-chip codec, and decrement using the bit clock. this technique allows telecom and audio data to be transferred between the mcp and codec, lock-step in sync with the sampling/conversion frequency of the codec. the mcp contains two pairs of transmit fifos and two pairs of receive fifos, one each for audio and telecom data, totalling four separate 8-entry x 16-bit fifos. the mcp also contains a 21-bit data register used to transmit codec register reads and writes, as well as another 21-bit register to receive the results of codec register reads. touch-screen and adc conversions are triggered, the digital i/o lines are controlled using codec register writes, and the converted data and the state of digital i/o lines are accessed using a codec register read. in ssp mode, serial port 4 controls full-duplex synchronous serial transfers between the sa-1110 and off-chip devices that support national microwire * , texas instruments * synchronous serial, or the motorola * spi protocol. the ssp functions as a master only and communicates to the off-chip slave device by driving a serial bit rate clock ranging from 7.2 khz to 1.8432 mhz along with a frame synchronization pulse to denote the start of each frame transfer, and supports any data format between 4 and 16 bits. transmit and receive data is stored/collected using two separate 8-entry x 16-bit fifos. mcp operation takes precedence over ssp operation. if use of both the mcp and ssp is required at the same time, the user can configure the ssp to take over control of gpio pins 10 through 13, and the mcp uses the serial port 4 pins for transmission. the external pins dedicated to this interface are txd4, rxd4, sclk, and sfrm. if use of both the mcp and ssp is not required and serial port 4 is disabled, control of these pins is given to the peripheral pin controller (ppc) to be used to perform general-purpose input/output (noninterruptible). see the section 11.13 on page 167 for a description of the programming and operation of the ppc. the mcp operation takes precedence over the ssp if both units are enabled. both the mcp and ssp support word reads/writes of their registers, and half-word dma transfers to or from their fifos that are 16-bits wide. 11.12.1 mcp operation following reset, both the mcp and ssp logic within serial port 4 is disabled and control of its pins is given to the ppc, which configures all four pins as inputs. to enable mcp operation, the programmer should first clear any interruptible status bits, which are set following the reset, by writing a one to them. next, the user should program the mcp control register with the desired mode of operation using word writes, ensuring that the enable bit is programmed last. the user can choose to either ? prime ? the audio and telecom transmit fifos, before enabling the mcp, by writing up to eight 16-bit values each, or allow the fifo service requests to interrupt the cpu or trigger a dma transfer to fill the fifos. once the off-chip codec is programmed and data resides within the bottom entries of the audio and/or telecom fifos, transmission/reception of data begins on the transmit (txd4) and receive (rxd4) pins, and is synchronously controlled by the serial clock (sclk) pin and a serial frame (sfrm) pin at a rate of 9.585 mhz or 11.981 mhz. the serial clock rate is selected by programming a control bit. note that the two sclk rates are derived by first multiplying the 3.6864-mhz on-chip oscillator by 13, then by dividing either by 5 (9.58464 mhz) or by 4 (11.9808 mhz). also note that an off-chip clock can be used to drive the mcp when a sample rate that is not a multiple of 3.6864 mhz is required.
11-128 sa-1110 developer ? s manual peripheral control module 11.12.1.1 frame format each mcp data frame is 128 bits long and is divided into two subframes: 0 and 1. subframe 0 is used by the mcp to communicate data to and from the ucb1100or ucb1200. subframe 1 is not used by the mcp because it is typically used to interface to high-performance stereo codecs such as crystal ? s cs4216/18. after the mcp is enabled, sclk begins to transition at the programmed clock rate and the start of the first frame is signalled by pulsing the sfrm pin high for one sclk period. the rising edge of sfrm coincides with the rising edge of sclk. the sfrm pulse causes the mcp to transfer any available audio and/or telecom data from their respective transmit fifos to a 64-bit serial shifter, setting the appropriate audio/telecom valid flags as well. if the codec control register contains valid data, the register value and address are placed within the appropriate fields in the shifter, and the read/write bit is configured to indicate which type of register access is to be made. for any field that does not have valid data available, the previous value transmitted is used. as long as the mcp is enabled, data frames are continuously transferred, even if no valid data is available for transmission. the format of data transmitted and received in subframe 0 is shown in figure 11-29 . note that the ucb110 and the usb1200 data sheets use big-endian notation; little-endian notation is used in the following figure to remain consistent with the rest of the sa-1110 specification. figure 11-29. mcp frame data format both the mcp and the off-chip codec drive data on the rising edge of sclk and latch data on its falling edge. after sfrm is negated, subframe 0 begins and the data within the 64-bit shifter is driven onto the txd4 pin a bit at a time, starting with the msb (bit 63). as each bit of data is shifted onto the txd4 pin from one side of the shifter, a bit is also shifted into the opposite end of the shifter from the rxd4 pin. after 64 sclk cycles elapse, all data within the shifter has been transmitted, and the shifter contains the 64-bit receive data frame. the mcp takes the data from each field and places it in its respective receive fifo or data register. the next 64 sclk cycles make up subframe 1. when subframe 1 is active, the clocks to all mcp resources that are not needed are turned off in order to conserve power. figure 11-30 shows the pin timing of the mcp. figure 11-30. mcp frame pin timing bit 63 48 47 46 43 42 41 34 33 32 3 1 1 6 1 5 0 tx audio transmit data 0 address r /w 00000000 av tv telecom transmit data control register write rx audio receive data 0 address r /w 00000000 av tv telecom receive data control register read av ? audio data valid tv ? telecom data valid r/w ? write=1, read=0 address ? codec register address frame clock count 1 2 ... 63 64 65 66 ... 127 128 1 subframe subframe 0 subframe 1 sclk ... ... sfrm ... txd4 bit 63 bit 62 ... bit 1 bit 0 ... bit 63 rxd4 bit 63 bit 62 ... bit 1 bit 0 ... bit 63
sa-1110 developer ? s manual 11-129 peripheral control module note that the transmit line is pulled low any time data is not being driven onto the pin. the ucb110 and ucb1200 have a programming option that allows them to either tristate or drive the receive line low when data is not being driven onto rxd4. as shown in figure 11-30 , mcp frames occur back-to-back. the sfrm pin is pulsed high during the last clock (128th) of the frame to indicate the start of a new frame the following sclk period. values contained within the transmit fifos are loaded to the shift register on the rising edge of sfrm. 11.12.1.2 audio and telecom sample rates and data transfer the ucb1100 and ucb1200 contain both an audio and telecom codec with sample rates that can be individually programmed, and are derived from the programmed serial clock (sclk) that is supplied by the mcp. for the audio codec, the sample rate is derived by dividing the serial clock first by a fixed value of 32, then by a value from 6 to 127. the same is true for the telecom codec, except that the programmable divisor ranges from 16 to 127. the codec and the mcp both contain an audio and a telecom sample rate counter. these counters are used to achieve conversion rate synchronization between the codec and mcp so that data may be coherently transferred between the mcp and the codec. for the remainder of this description, references made to the audio codec also apply to the telecom portion of the codec and mcp. before enabling the audio codec, the audio sample rate counters within the codec and mcp must programmed with the same divisor value so that they have the same clock rate. the codec ? s audio sample rate divisor is programmed by issuing a control register write transfer, and the mcp ? s divisor is programmed using the cpu by writing to the mcp ? s control register. both the mcp and the codec ? s audio counters are reloaded with the programmed modulus value any time the audio portion of the codec is enabled (which is also accomplished by performing a control register write transfer), or whenever the sample rate counters reach zero. the mcp and the audio codec decrement their counters in lock-step with one another, both starting on the occurrence of the first sfrm pulse after the audio codec is enabled. samples/conversions are made each time the audio codec ? s counter reaches zero. figure 11-31 shows the timing of the audio codec enable and decrements of the mcp and audio codec ? s sample counter. figure 11-31. mpc/codec sampling counter synchronization in the preceding figure, ? ena, ? within the data frame on txd4, represents a control register write to the codec to enable the input portion of the audio codec. the register is updated with the write at the end of subframe and the audio enable signal within the codec goes high. both the mcp and codec ? s audio sample rate counters then start to decrement on the next sfrm pulse. in the example, a divisor value of 12 is used, causing the counter to decrement to zero after 384 (32*12=384) sclk cycles occur. subframe 0101010101010101010101 sfrm txd4 ena dis audio ena counters 12....12 12.11.10.9.8.7.6.5.4.3.2.1 12.11.10.9.8.7.6.5.4.3.2.1 12.11.10.9.8.7.6 12...................12 samp/conv
11-130 sa-1110 developer ? s manual peripheral control module if the input portion of the audio codec is enabled, when the counter reaches zero, a sample and a-to-d conversion is made and the converted value is placed within the correct field of the codec ? s serial shift register for transmission back to the mcp in the next data frame. if the output portion of the audio codec is enabled, an audio data value is taken from the received data supplied by the mcp and is used for a d-to-a conversion. data used in the d-to-a conversion is always taken from the previous mcp input frame. if no new data is available within the mcp ? s audio transmit fifo since the last d-to-a conversion, then the same data is used again (causing audio distortion). samples and conversions occur twice in the preceding figure. however, while the counter is decrementing for the third time, the cpu disables the audio codec by issuing another control register write, represented by the ? dis ? data frame on txd4. the sfrm pulse following the write causes the disable to take effect, and the mcp and codec ? s audio sample rate counters are stopped and reset to their modulus values. the mcp and the codec ? s audio sample rate counters must be enabled coherently so that synchronization is achieved between the two. this is accomplished by first programming both the mcp and codec ? s sample rate modulus values, then performing a codec control register write to enable the audio sampling rate counter within the codec. the mcp automatically decodes a write to the audio codec input and output enable bits, and enables the mcp ? s audio sample rate counter at the same time as the codec ? s counter to ensure synchronization. the ucb1100 and ucb1200 each have an individual data valid bit for audio and telecom a/d samples. whenever these bits are set in the data frame returned from the codec to the mcp, the audio and telecom data is taken from the frame and placed in their respective receive fifos. the ucb1100 and ucb1200 have two different modes of operation to control the setting of the audio and telecom data valid bits. in the first mode, a data valid bit is set any time a frame contains ? reliable ? data ( the codec is enabled and at least one a-to-d sample has been taken). in this mode, once the data valid bit is set, it remains set until the codec a-to-d input is disabled. in the second mode, the codec only sets the data valid bit corresponding to a new a-to-d sample. once the data is transmitted to the mcp within a receive data frame, the data valid bit is reset to zero for subsequent data frames until a new a-to-d sample is triggered. 11.12.1.3 mcp transmit and receive fifo operation the mcp contains four 8-entry x 16-bit fifos: one for audio and one for telecom a-to-d samples received by the mcp, as well as one for audio and one for telecom d-to-a conversions transmitted to the codec. for the remainder of this description, references made to the audio codec also apply to the telecom portion of the codec and mcp. for each incoming data frame, if the audio data valid bit is set, the 16-bit audio a-to-d sample is extracted and placed in the audio receive fifo. note that the mcp also supports a mode in which the audio data valid bit is ignored after the first conversion has been saved to the fifo, and the mcp ? s audio sample rate counter is used to signal when a new a-to-d sample has been taken and is available within the incoming frame. audio data is transferred from the incoming data frames to the receive fifo only if the audio enable bit is set within the mcp ? s status register. the mcp ? s audio and telecom sample rate counters are used to trigger when new d/a conversions are to be transmitted to the codec. the user should take care in ensuring sample rate counters in the mcp are synchronized with the respective sample rate counters in the codec as described in preceding sections. when the audio enable status bit transitions from a 0 to a 1 within the mcp status register, the next available entry of data is taken from the audio transmit fifo and is placed within the correct field in the mcp ? s serial shifter. this value is then continuously transferred by the mcp in each data frame to the codec. the codec uses the value only when its audio sample rate counter decrements to zero. after the audio d-to-a conversion is made, both the codec and the mcp ? s audio sample rate counters reload with their modulus values. this reload triggers the audio transmit fifo to transfer the next available entry of data to the mcp ? s serial shifter. again, this value is continuously transmitted to the codec in each data frame until it is used in the next audio d-to-a conversion.
sa-1110 developer ? s manual 11-131 peripheral control module the width of each entry within the audio and telecom fifos is 16 bits. however, the audio codec ? s sample/conversion data size is 12 bits and the telecom is 14 bits. conversions and samples are left justified within the 16-bit audio and telecom data fields in the mcp frame as well as within the transmit and receive fifos. figure 11-32 shows the required data alignment for the transmit and receive audio and telecom fifos. the user must left justify data to be transmitted, and shift received data to the right before using the results. figure 11-32. audio/telecom transmit/receive fifo data format to reduce chip size as well as power consumption, the mcp ? s fifos use self-timed logic (not clocked). because of process and environmental variations, the depth at which a service request is triggered to empty the receive fifos is variable. this variation spans a maximum of four fifo entries, thus the audio and telecom receive fifo service requests can be made at four different fifo depths.to compensate for this variability and guarantee that at least four valid entries of data exist within either fifo before generating a service request, an extra four entries have been added to both receive fifos (four entries more than the transmit fifos). thus the audio and telecom transmit fifos are 8-entries deep and the audio and telecom receive fifos are 12-entries deep. the point at which the receive fifo service requests are triggered spans one-third (four entries) of the 12-entry fifos. the service request is signalled at a depth from one-third full to two-thirds full (when the fifos contains five, six, seven, or eight entries of data). 11.12.1.4 codec control register data transfer the ucb1100and ucb1200 contain sixteen 16-bit registers used to configure the chip, and store touch-screen and adc samples as well as digital i/o pin state and edge interrupt status. these registers are read and written via the mcp ? s serial interface using three fields that exist within the mcp ? s data frame. in figure 11-29 , bits 15:0 contain the value read from or written to the off-chip codec, bits 46:43 contain the register address of the current read or write, and bit 42 is used by the mcp to signal a read or write cycle to the codec. these fields are configured by the cpu by writing to mcp control register 2, and are then transmitted to the off-chip codec. these fields are also received every data frame by the mcp from the codec and are placed in mcp control register 2, which can be read by the cpu. note that the contents of the addressed register are returned in the receive data frame regardless of the state of the read/write bit. thus for write cycles, both a write and a read occurs, and for read cycles, only a read occurs. a register write is performed by writing a value to the mcp control register 2 that contains the value to store to the register, the address of the register, and the read/write bit set to one. once this register is written, its contents are transferred to the correct fields within the serial shifter on the next rising edge of the sfrm signal. the register information is transmitted to the ucb1100 or ucb1200 during subframe 0, and the value is written to the selected codec register at the end of subframe 0 (during the 65th bit of the frame). the control register value and address are also returned to the mcp and stored in mcp control register 2. the read/write bit is zero in the return frame. because the addressed register is updated at the end of subframe 0, the data returned during the frame in which the write occurred represents the previous contents of the register. the updated value is returned during the next data frame. bit1514131211109876543210 audio data 0 0 0 0 bit1514131211109876543210 telecom data 0 0
11-132 sa-1110 developer ? s manual peripheral control module a register read is performed by writing a value to mcp data register 2 that contains the address of the register and the read/write bit set to a zero. again, the data is transferred to the serial shifter on the next rising edge of the sfrm signal and is transmitted to the ucb1100 or ucb1200 during subframe 0. because the address and read/write control bit fields occur near the beginning of the serial stream output, the codec performs the read immediately after the read/write bit is received (during the 41st bit of the frame) and the value contained within the addressed register is sent back to the mcp in the same data frame. once the codec control register is written with a value to execute a read or write, the operation is performed every mcp data frame until a new value is written to the register. thus, continual reads or writes are made to the addressed codec register until a new read or write operation is configured. 11.12.1.5 external clock operation under normal operation, the mcp is programmed to use one of two on-chip clocks to produce a 9.585-mbps or 11.981-mbps bit rate. this clock is also used to increment the audio and telecom sample rate counters. the mcp also supports a special mode that allows the user to control the mcp ? s frame rate and audio/telecom sample rates. this mode is useful when sample rates that are not an integer multiple of 12 mhz are required. in this mode, the mcp uses gpio 21 to input a clock supplied from off-chip. the frequency of the off-chip clock can be any value within the allowable frequency range of the ucb100, up to 12 mhz. when using gpio pin 21 for the input clock, the user must also set bit 21 of the gpio alternate function register (gafr) and clear bit 21 of the gpio pin direction register (gpdr). see the section 9.1, ? general-purpose i/o ? on page 9-1 . 11.12.1.6 alternate ssp pin assignment mcp operation takes precedence over ssp operation. thus if both are enabled, serial port 4 defaults to mcp mode. however, if the mcp and ssp both need to be used at the same time, general-purpose i/o pins 10..13 (gpio 10..13) can be reassigned by programming the ppc pin assignment register (ppar). this allows the mcp dedicated use of the four pins assigned to serial port 4, and the ssp dedicated use of the gpio pins. when the ssp pin reassignment (spr) bit is set in ppar, the following pin assignments are made: gpio 10 is used for transmit, gpio 11 for receive, gpio 12 for serial clock, and gpio 13 for serial frame. note that the user must also set bits 10 through 13 in the gpio alternate function register (gafr) as well as set bits 10, 12, and 13, and clear bit 11 in the gpio pin direction register (gpdr). once the reassignment is made, these pins are no longer usable by the gpio unit. see the section 9.1, ? general-purpose i/o ? on page 9-1 for a description of how to program the system control module and the section 11.13, ? peripheral pin controller (ppc) ? on page 11-167 for a description of how to program the ppc unit. 11.12.1.7 cpu and dma register access sizes bit positioning and addressing of the mcp is described in terms of little endian ordering. all mcp registers are 32 bits wide. the arm peripheral bus does not support byte or half-word operations. all reads and writes of the mcp by the cpu should be word ? wide. four separate dedicated dma requests exist for the audio and telecom transmit and receive fifos. if the dma controller is used to service the transmit and/or receive fifos, the user must ensure the dma is properly configured to perform half-word accesses, using 4 half-words per burst (half the size of the fifos). note that a separate set of registers also exist to configure ssp operation. see the following sections for a full description of programming and operation of serial port 4 as an ssp, a summary of serial port 4 ? s mcp registers, and a summary of its ssp registers.
sa-1110 developer ? s manual 11-133 peripheral control module 11.12.2 mcp register definitions there are six registers within the mcp: two control registers, three data registers, and one status register. the control register is used to program the audio and telecom sample rates, to mask or unmask interrupt requests to service the mcp ? s fifos, to select whether an on-chip or off-chip clock is used to drive the bit rate, and to enable/disable operation. the first data register addresses the top of the audio transmit fifo and the bottom of the audio receive fifo. likewise, the second data register addresses the top/bottom of the telecom transmit/receive fifos, respectively. a read accesses the receive fifos; a write accesses the transmit fifos. note that these are four physically separate fifos to allow full-duplex transmission. the third data register is 21 bits and is used to transmit read and write operations to the codec ? s control, data, and status registers. values written to the register are used in the transmit data frame and values read are taken from the received data frame. the status register contains bits that signal fifo overrun and underrun errors, and transmit and receive fifo service requests. each of these status conditions signals an interrupt request to the interrupt controller. the status register also flags when audio and telecom transmit fifos are not full, when the audio and telecom receive fifos are not empty, when a codec control register read or write is complete, and when the audio or telecom portion of the codec is enabled (no interrupt generated). 11.12.3 mcp control register 0 the mcp control register (mccr0) contains 11 different bit fields that control various functions within the mcp. 11.12.3.1 audio sample rate divisor (asd) the 7-bit audio sample rate divisor (asd) bit field is used to synchronize the mcp with the sample rate of the audio codec. sample rate synchronization is required such that the mcp ? s audio transmit fifo logic knows when to load a new value for d-to-a conversion to the mcp ? s serial shifter for transmission. this field is programmed with the same value that is written to the codec ? s sample rate divisor via a codec control register write. when the audio codec is enabled, the first audio transmit value is placed in the serial output stream by the transmit fifo, and both the mcp ? s and codec ? s sample rate counters begin to decrement in lock-step with one another. when the audio codec ? s counter decrements to zero, it uses the value transmitted to it by the mcp to perform the d-to-a conversion. after the conversion is made, the mcp and codec ? s counters reset to their modulus values, and the mcp ? s audio transmit fifo loads the next value to the serial shifter for transmission. this new value is then transmitted to the audio codec and is used for the next d-to-a conversion, which is signalled when the sample rate counter decrements to zero again. a total of 122 different audio sample rates can be selected, ranging from a minimum of 2.358 k samples per second using the 9.585-mhz internal clock to a maximum of 62.401 k samples per second using the 11.981-mhz internal clock. note that slower sample rates can be achieved using an externally supplied clock. the sample rate clock generator uses either a 9.585-mhz or 11.981-mhz clock produced by the on-chip pll or the clock supplied to the mcp via gpio pin 21, and is divided by a fixed value of 32 and then by the programmable asd value to generate the audio sample clock. this clock is automatically enabled when:  a codec control register write to the audio control register b is made (address=0b100), which sets either the audio codec input or output enable bits (bit 14 = aud_in_ena, bit 15 = aud_out_ena), followed by  the rising edge of the next sfrm pulse after the write has been made.
11-134 sa-1110 developer ? s manual peripheral control module once enabled, the mcp ? s audio sample rate clock decrements at the programmed frequency with a 50% duty cycle. the action outlined in the above first bullet item causes the mcp ? s audio transmit fifo logic to transfer the next available value to the audio data field within the serial shifter. each time the audio sample rate clock decrements to zero, it is reloaded with its programmed asd modulus value, triggers the audio transmit fifo logic to transfer the next available value to the audio data field within the serial shifter, and continues to decrement. the mcp ? s audio sample rate clock is automatically disabled when:  a codec control register write to the audio control register b is made (address=0b100), which clears both the audio codec input and output enable bits (bit 14 = aud_in_ena, bit 15 = aud_out_ena), followed by  the rising edge of the next sfrm pulse after the write has been made. the resultant audio sample clock rate, given a specific asd value, can be calculated using the following equation, where asd is the decimal equivalent of the binary value programmed within the bit field. note that asd must be programmed with a value of 6 or larger. unpredictable results occur for asd values smaller than 6. note that one of three clock frequencies can be selected. the first two frequencies are internal clocks selected by the cfs bit in mccr1 and the third frequency is a user-defined clock that is input via gpio pin 21 and is divided as defined by the ecp bit field described in following sections. 11.12.3.2 telecom sample rate divisor (tsd) the 7-bit telecom sample rate divisor (tsd) bit field is used to synchronize the mcp with the sample rate of the telecom codec. the telecom sample rate clock is required for the same reason and works exactly like the audio sample rate clock, except for one minor difference. the valid tsd values range from 16 to 127 (instead of 6), allowing a total of 112 different audio sample rates to be selected, ranging from a minimum of 2.358 k samples per second using the 9.585-mhz internal clock to a maximum of 23.400 k samples per second using the 11.98-mhz internal clock. note that slower sample rates can be achieved using an externally supplied clock. the resultant telecom sample clock rate, given a specific tsd value, can be calculated using the following equation, where tsd is the decimal equivalent of the binary value programmed within the bit field. note that tsd must be programmed with a value of 16 or larger. unpredictable results occur for tsd values smaller than 16. note that one of three clock frequencies can be selected. the first two frequencies are internal clocks selected by the cfs bit in mccr1 and the third frequency is a user-defined clock that is input via gpio pin 21 and is divided by the ecp bit field described in the following sections. samplerate 12 6 10 32 x asd ----------------------- - = valid asd values are from 6 (00000110) to 127 (11111111) note: the 12x10 6 value within the formula ? s numerator should be replaced with the frequency of the clock driven to gpio pin 21 when an off-chip clock source is used to drive the mcp. samplerate 12 6 10 32 x tsd ----------------------- = valid tsd values are from 16 (00010000) to 127 (11111111) note: the 12x10 6 value within the formula ? s numerator should be replaced with the frequency of the clock driven to gpio pin 21 when an off-chip clock source is used to drive the mcp.
sa-1110 developer ? s manual 11-135 peripheral control module 11.12.3.3 multimedia communications port enable (mce) the mcp enable (mce) bit is used to enable and disable all mcp operation. since the mcp and ssp both share the same pins, only one can be enabled at a time. if the user enables both at the same time, the mcp has precedence and the ssp remains disabled. however, both can be enabled when the ssp pin reassignment (spr) bit within the ppc unit is set, which assigns the ssp to gpio pins. see the following sections for a description of the ssp enable (sse) bit. when the mcp is disabled, all of its clocks are powered down to minimize power consumption. if the ssp is also disabled, the txd4, rxd4, sclk, and sfrm pins can be used for general-purpose input/output. see the section 11.13, ? peripheral pin controller (ppc) ? on page 11-167 for a description of how to program the ppc unit to reassign the ssp ? s pins and to use serial port 4 ? s pins as i/os. note that mce and cfs are the only control bits within the mcp that are reset to a known state. mce is cleared to zero to ensure the mcp is disabled following a reset of the sa-1110. when the mcp is enabled, sclk begins to transition and the start of the first frame is signalled by pulsing the sfrm pin high for one sclk period. the rising edge of sfrm coincides with the rising edge of sclk. as long as the mce bit is set, the mcp operates continuously, transmitting and receiving 128 bit data frames. when the mce bit is cleared, the mcp is disabled immediately, causing the current frame, which is being transmitted, to be terminated and control of serial port 4 ? s pins to be given to the ppc unit. clearing mce resets the mcp ? s fifos. however, mcp data register 3, the control, and the status registers are not reset. the user must ensure these registers are properly reconfigured before reenabling the mcp. 11.12.3.4 external clock select (ecs) the external clock select (ecs) bit selects whether one of the two on-chip clocks derived by the 3.6864-mhz oscillator is used by the mcp or if an off-chip clock is supplied via gpio pin 21. when ecs=0, the mcp can be programmed to select one of two frequencies: either 9.585 mhz or 11.981 mhz. this clock is also used to increment the audio and telecom sample rate counters. (see preceding sections.) when ecs=1, the mcp uses gpio 21 to input a clock supplied from off-chip. the frequency of the off-chip clock after being scaled by the ecp bit field can be any value within the allowable frequency range of the ucb100 up to 12 mhz. this off-chip clock is useful when a sample rate frequency, which is not a multiple of 9.585 mhz or 11.981 mhz is required for synchronization with either the audio and/or telecom portion of the ucb1100or ucb1200 codecs. when using gpio pin 21 for the input clock, the user must also set bit 21 of the gpio alternate function register (gafr) and clear bit 21 of the gpio pin direction register (gpdr). see the section 9.1, ? general-purpose i/o ? on page 9-1 . 11.12.3.5 a/d sampling mode (adm) the a/d sampling mode (adm) bit selects whether the mcp takes audio and telecom data from the incoming frame only when their respective data valid bits are set or whenever the mcp ? s audio and telecom sample rate counters time-out, indicating that the data in the next incoming frame is valid. when adm=0, data is taken from the incoming frame and is placed into the audio or telecom fifo whenever the incoming audio or telecom data valid bit is set. when adm=1, after the mcp is enabled, data is taken from the incoming frame when the data valid bit is set for the first time. after this point, the data valid bit is ignored, and samples are stored each time the audio or telecom sample rate counters decrement to zero, indicating that a new a-to-d sample was taken and will be available in the next frame. the ucb1100 and ucb1200 have two different modes of operation to control the setting of the audio and telecom data valid bits. in one mode, the codec only sets the data valid bit when a new a-to-d sample is contained within the incoming data frame. once the data is transmitted to the
11-136 sa-1110 developer ? s manual peripheral control module mcp within a receive data frame, the data valid bit is reset to zero for subsequent data frames until a new a-to-d sample is triggered and transmitted to the mcp. in this mode, the user should program adm=0. in the other mode, the data valid bit is set once when the first a-to-d conversion is made and is placed in the receive data frame. however, the data valid bit remains set and the mcp cannot determine when new a-to-d conversions are available within the incoming frame. programming adm=1 prevents multiple copies of the same a-to-d conversion to be placed in the fifo, storing samples only when the sample rate counter times out. 11.12.3.6 telecom transmit fifo interrupt enable (tte) the telecom transmit fifo interrupt enable (tte) bit is used to mask or enable the telecom transmit fifo service request interrupt. when tte=0, the interrupt is masked and the state of the telecom transmit fifo service request (tts) bit within the mcp status register is ignored by the interrupt controller. when tte=1, the interrupt is enabled, and whenever tts is set (one), an interrupt request is made to the interrupt controller. note that programming tte=0 does not affect the current state of tts or the telecom transmit fifo logic ? s ability to set and clear tts; it only blocks the generation of the interrupt request. also note that tte does not affect generation of the telecom transmit fifo dma request, which is asserted any time tts=1. 11.12.3.7 telecom receive fifo interrupt enable (tre) the telecom receive fifo interrupt enable (tre) bit is used to mask or enable the telecom receive fifo service request interrupt. when tre=0, the interrupt is masked, and the state of the telecom receive fifo service request (trs) bit within the mcp status register is ignored by the interrupt controller. when tre=1, the interrupt is enabled, and whenever trs is set (one), an interrupt request is made to the interrupt controller. note that programming tre=0 does not affect the current state of trs or the telecom receive fifo logic ? s ability to set and clear trs; it only blocks the generation of the interrupt request. also note that tre does not affect generation of the telecom receive fifo dma request, which is asserted any time trs=1. 11.12.3.8 audio transmit fifo interrupt enable (ate) the audio transmit fifo interrupt enable (ate) bit is used to mask or enable the audio transmit fifo service request interrupt. when ate=0, the interrupt is masked and the state of the audio transmit fifo service request (ats) bit within the mcp status register is ignored by the interrupt controller. when at=1, the interrupt is enabled, and whenever ats is set (one), an interrupt request is made to the interrupt controller. note that programming ate=0 does not affect the current state of ats or the audio transmit fifo logic ? s ability to set and clear ats; it only blocks the generation of the interrupt request. also note that ate does not affect generation of the audio transmit fifo dma request, which is asserted any time ats=1. 11.12.3.9 audio receive fifo interrupt enable (are) the audio receive fifo interrupt enable (are) bit is used to mask or enable the audio receive fifo service request interrupt. when are=0, the interrupt is masked, and the state of the audio receive fifo service request (ars) bit within the mcp status register is ignored by the interrupt controller. when are=1, the interrupt is enabled, and whenever ars is set (one), an interrupt request is made to the interrupt controller. note that programming are=0 does not affect the current state of ars or the audio receive fifo logic ? s ability to set and clear ars; it only blocks the generation of the interrupt request. also note that are does not affect generation of the audio receive fifo dma request, which is asserted any time ars=1.
sa-1110 developer ? s manual 11-137 peripheral control module 11.12.3.10 loopback mode (lbm) the loopback mode (lbm) bit is used to enable and disable the ability of the mcp ? s transmit and receive logic to communicate. when lbm=0, the mcp operates normally. the transmit and receive data paths are independent and communicate via their respective pins. when lbm=1, the output of the serial shifter (msb) is directly connected to the input of the serial shifter (lsb) internally and control of the txd4, rxd4, sclk, and sfrm pins are given to the peripheral pin control (ppc) unit. 11.12.3.11 external clock prescaler (ecp) the 2-bit external clock select (ecp) field is used to divide the clock input via gpio pin 21 when the external clock function is enabled. when ecs=1, ecp is decoded to divide the clock input on the gpio 21 pin by 1, 2, 3, or 4 before being used to drive the mcp ? s frame rate. when ecp=00, the input clock is divided by 1; when ecp=01, it is divided by 2; when ecp=10, it is divided by 3; and when ecp=11, it is divided by 4. note that the ecp bit field is ignored when the internal clock (ecs=0) is used to drive the mcp ? s frame rate. also note that the resultant clock frequency after the divide has taken place can be any value within the allowable frequency range of the ucb1100 or ucb1200 (up to 12 mhz). the following table shows the bit locations corresponding to the 10 different control bit fields within the mcp control register. note that the mce bit is the only control bit that is reset to a known state to ensure the mcp is disabled following a reset of the sa-1110. the reset state of all other control bits is unknown (indicated by question marks) and must be initialized before enabling the mcp. the user can program all 11 bit fields and enable the mcp using a single word write to mccr0. writes to reserved bits are ignored and reads return zeros. 0h 8006 0000 mcp control register 0: mccr0 read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved ecp lbm are ate tre tte adm ecs mce reserved tsd reserved asd reset 0 0 0 0 0 0 0 0 ? ? ? ? ? ? ? 0 0 ? ? ? ? ? ? ? 0 ? ? ? ? ? ? ? (sheet 1 of 3) bits name description 6..0 asd audio sample rate divisor. value (from 6 to 127) used to match the sample rate of the audio codec within the ucb1100, or ucb1200 to time when audio d/a data should be supplied by the audio transmit fifo. sample rate = programmed clock rate/(32xasd), where asd is a decimal value. 7 ? reserved. 14..8 telecom sample rate divisor. value (from 16 to 127) used to match the sample rate of the telecom codec within the ucb1100 or ucb1200 to time when telecom d/a data should be supplied by the telecom transmit fifo. sample rate = programmed clock rate/(32xtsd), where tsd is a decimal value. 15 ? reserved.
11-138 sa-1110 developer ? s manual peripheral control module 16 mce multimedia communications port enable. 0 ? mcp operation disabled, control of the txd4, rxd4, sclk, and sfrm pins given to the ppc to be used as general-purpose i/o pins. 1 ? mcp operation enabled. note that the mcp has precedence over the ssp, if mce=1; sse is ignored unless the spr bit is set within the ppc, which allows the ssp to use gpio pins while the mcp uses serial port 4 ? s pin for transmission. 17 ecs external clock select. 0 ? on-chip clock used to produce the frame rate as further programmed by the cfs control bit in mccr1. it is also used to clock the audio and telecom sample rate counters. 1 ? clock input using gpio pin 21 to select a frame rate that is an exact multiple of the desired audio/telecom sample rate. frame rate = input clock frequency /(ecp x 32). sample rate = input clock frequency /(ecp x 32 x asd or tsd). 18 adm a/d data sampling mode. 0 ? audio and telecom receive data is stored to their respective fifos whenever their receive data valid bits are valid. 1 ? audio and telecom receive data is stored when the receive data valid bit is set the first time, and from that point on whenever the mcp ? s audio and telecom sample rate counters time out. 19 tte telecom transmit fifo interrupt enable. 0 ? telecom transmit fifo half-full or less condition does not generate an interrupt (tts bit ignored). 1 ? telecom transmit fifo half-full or less condition generates an interrupt (state of tts sent to interrupt controller). 20 tre telecom receive fifo interrupt enable. 0 ? telecom receive fifo one- to two-thirds full or more condition does not generate an interrupt (trs bit ignored). 1 ? telecom receive fifo one- to two-thirds full or more condition generates an interrupt (state of trs sent to interrupt controller). 21 ate audio transmit fifo interrupt enable. 0 ? audio transmit fifo half-full or less condition does not generate an interrupt (ats bit ignored). 1 ? audio transmit fifo half-full or less condition generates an interrupt (state of ats sent to interrupt controller). 22 are audio receive fifo interrupt enable. 0 ? audio receive fifo one- to two-thirds full or more condition does not generate an interrupt (ars bit ignored). 1 ? audio receive fifo one- to two-thirds full or more condition generates an interrupt (state of ars sent to interrupt controller). 23 lbm loopback mode. 0 ? normal serial port operation enabled. 1 ? output of serial shifter is connected to input of serial shifter internally and control of txd4 , rxd4 , sclk , and sfrm pins is given to the ppc unit. 0h 8006 0000 mcp control register 0: mccr0 read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved ecp lbm are ate tre tte adm ecs mce reserved tsd reserved asd reset 0 0 0 0 0 0 0 0 ? ? ? ? ? ? ? 0 0 ? ? ? ? ? ? ? 0 ? ? ? ? ? ? ? (sheet 2 of 3) bits name description
sa-1110 developer ? s manual 11-139 peripheral control module 16 mce multimedia communications port enable. 0 ? mcp operation disabled, control of the txd4, rxd4, sclk, and sfrm pins given to the ppc to be used as general-purpose i/o pins. 1 ? mcp operation enabled. note that the mcp has precedence over the ssp, if mce=1; sse is ignored unless the spr bit is set within the ppc, which allows the ssp to use gpio pins while the mcp uses serial port 4 ? s pin for transmission. 17 ecs external clock select. 0 ? on-chip clock used to produce the frame rate as further programmed by the cfs control bit in mccr1. it is also used to clock the audio and telecom sample rate counters. 1 ? clock input using gpio pin 21 to select a frame rate that is an exact multiple of the desired audio/telecom sample rate. frame rate = input clock frequency /(ecp x 32). sample rate = input clock frequency /(ecp x 32 x asd or tsd). 18 adm a/d data sampling mode. 0 ? audio and telecom receive data is stored to their respective fifos whenever their receive data valid bits are valid. 1 ? audio and telecom receive data is stored when the receive data valid bit is set the first time, and from that point on whenever the mcp ? s audio and telecom sample rate counters time out. 19 tte telecom transmit fifo interrupt enable. 0 ? telecom transmit fifo half-full or less condition does not generate an interrupt (tts bit ignored). 1 ? telecom transmit fifo half-full or less condition generates an interrupt (state of tts sent to interrupt controller). 20 tre telecom receive fifo interrupt enable. 0 ? telecom receive fifo one- to two-thirds full or more condition does not generate an interrupt (trs bit ignored). 1 ? telecom receive fifo one- to two-thirds full or more condition generates an interrupt (state of trs sent to interrupt controller). 21 ate audio transmit fifo interrupt enable. 0 ? audio transmit fifo half-full or less condition does not generate an interrupt (ats bit ignored). 1 ? audio transmit fifo half-full or less condition generates an interrupt (state of ats sent to interrupt controller). 22 are audio receive fifo interrupt enable. 0 ? audio receive fifo one- to two-thirds full or more condition does not generate an interrupt (ars bit ignored). 1 ? audio receive fifo one- to two-thirds full or more condition generates an interrupt (state of ars sent to interrupt controller). 23 lbm loopback mode. 0 ? normal serial port operation enabled. 1 ? output of serial shifter is connected to input of serial shifter internally and control of txd4 , rxd4 , sclk , and sfrm pins is given to the ppc unit. 0h 8006 0000 mcp control register 0: mccr0 read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved ecp lbm are ate tre tte adm ecs mce reserved tsd reserved asd reset 0 0 0 0 0 0 0 0 ? ? ? ? ? ? ? 0 0 ? ? ? ? ? ? ? 0 ? ? ? ? ? ? ? (sheet 2 of 3) bits name description
11-140 sa-1110 developer ? s manual peripheral control module 11.12.4 mcp control register 1 the mcp control register 1 (mccr1) contains one bit that selects one of two fixed frequencies to drive the mcp. note that this register resides within the ppc ? s address space. 11.12.4.1 clock frequency select (cfs) when the on-chip clock is enabled (ecs=0), the clock frequency select (cfs) bit is used to select either a 9.585-mhz or an 11.981-mhz clock to drive the mcp ? s serial clock rate. when ecs=0 and cfs=0, the on-chip 3.6864-mhz oscillator is first multiplied by 13 then divided by 4, resulting in an 11.9808-mhz bit clock frequency. when ecs=0 and cfs=1, the on-chip 3.6864 mhz oscillator is first multiplied by 13 then divided by 5, resulting in a 9.58464-mhz bit clock frequency. note that when ecs=1, cfs is ignored and an external clock is input to the mcp via gpio pin 21. also note that cfs is cleared following a reset of the sa-1110 so that the mcp defaults to 11.981-mhz operation, which is standard for the ucb1100/1200. the following table shows the location of the cfs control bit within the mcp control register 1. the cfs is cleared to zero selecting 11.981-mhz operation following a reset of the sa-1110. writes to reserved bits are ignored and reads return zeros. mccr1 resides within the ppc ? s address space. 25..24 ecp external clock prescaler. 00 ? clock input using gpio pin 21 is divided by one before being used to drive the frame rate. 01 ? clock input using gpio pin 21 is divided by two before being used to drive the frame rate. 10 ? clock input using gpio pin 21 is divided by three before being used to drive the frame rate. 11 ? clock input using gpio pin 21 is divided by four before being used to drive the frame rate. note: ecp is used only when ecs=1. also, the maximum clock frequency allowed to drive the frame rate after ecs has divided down the input clock is 12 mhz. 31..26 ? reserved. 0h 8006 0000 mcp control register 0: mccr0 read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved ecp lbm are ate tre tte adm ecs mce reserved tsd reserved asd reset 0 0 0 0 0 0 0 0 ? ? ? ? ? ? ? 0 0 ? ? ? ? ? ? ? 0 ? ? ? ? ? ? ? (sheet 3 of 3) bits name description
sa-1110 developer ? s manual 11-141 peripheral control module 11.12.5 mcp data registers the mcp contains three data registers. mcdr0 addresses the top entry of the audio transmit fifo and bottom entry of the audio receive fifo, mcdr1 addresses the top and bottom entries of the telecom transmit and receive fifos respectively, and mcdr2 is used to perform reads and writes to any of the codec ? s 16 registers via the mcp ? s serial interface. 11.12.5.1 mcp data register 0 when mcp data register 0 (mcdr0) is read, the bottom entry of audio receive fifo is accessed. as data is removed by the mcp ? s receive logic from the incoming data frame, it is placed into the top entry of the audio receive fifo and is transferred down an entry at a time until it reaches the last empty location within the fifo. data is removed by reading mcdr, which accesses the bottom entry of the audio fifo. after mcdr0 is read, the bottom entry is invalidated and all remaining values within the fifo automatically transfer down one location. when mcdr0 is written, the topmost entry of the audio transmit fifo is accessed. after a write, data is automatically transferred down to the lowest location within the transmit fifo, which does not already contain valid data. data is removed from the bottom of the fifo one value at a time by the transmit logic, is loaded into the correct position within the 64-bit transmit serial shifter, and then is serially shifted out onto the txd4 pin during subframe 0. audio data is 12 bits wide and must be left justified by the user before writing it to the transmit fifo (msb of audio data corresponds to bit 16 of transmit fifo). the lower four bits of the fifo are automatically zero filled by the transmit logic when a 16-bit value is written to mcdr0 for transmission. the ucb1100 or ucb1200 automatically forces bits 0 through 3 to zero before transmitting the value to the mcp. the user must right justify received audio data before using it. the following table shows mcdr0. note that the transmit and receive audio fifos are cleared when the sa-1110 is reset or by writing a zero to mce (mcp disabled). also note that writes to reserved bits are ignored and reads return zeros. 0h 9006 0030 mcp control register 1: mccr1 read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved cfs reserved 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 bits name description 19..0 ? reserved. 20 cfs clock frequency select. 0 ? if ecs=0, bit rate clock frequency of 11.981 mhz is selected. 1 ? if ecs=0, bit rate clock frequency of 9.585 mhz is selected. if ecs=1, cfs is ignored and an external clock supplied by gpio pin 21 is used. 31..21 ? reserved.
11-142 sa-1110 developer ? s manual peripheral control module 11.12.5.2 mcp data register 1 when mcp data register 1 (mcdr1) is read, the bottom entry of the telecom receive fifo is accessed. as data is removed by the mcp ? s receive logic from the incoming data frame, it is placed into the top entry of the telecom receive fifo and is transferred down an entry at a time until it reaches the last empty location within the fifo. data is removed by reading mcdr1, which accesses the bottom entry of the telecom fifo. after mcdr1 is read, the bottom entry is invalidated, and all remaining values within the fifo automatically transfer down one location. when mcdr1 is written, the topmost entry of the telecom transmit fifo is accessed. after a write, data is automatically transferred down to the lowest location within the transmit fifo, which does not already contain valid data. data is removed from the bottom of the fifo one value at a time by the transmit logic, is loaded into the correct position within the 64-bit transmit serial shifter, and then is serially shifted out onto the txd4 pin during subframe 0. telecom data is 14 bits wide and must be left justified by the user before writing it to the transmit fifo (msb of telecom data corresponds to bit 16 of transmit fifo). the lower two bits of the fifo are automatically zero filled by the transmit logic when a 16-bit value is written to mcdr1 for transmission. the ucb1100 or ucb1200 automatically forces bits 0 and 1 to zero before transmitting the value to the mcp. the user must right justify received telecom data before using it. 0h 8006 0008 mcp data register 0: mcdr0 read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved bottom of audio receive fifo 0000 reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 read access 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved top of audio transmit fifo 0000 reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 write access bits name description 3..0 ? reserved for future enhancements. read ? data returned, but ucb1100 and ucb1200 currently zero fill these four bits. write ? mcp ? s transmit logic automatically zero fills these bits. 15..4 audio data transmit/receive audio fifo data. read ? bottom of audio receive fifo data. write ? top of audio transmit fifo data. 31..16 ? reserved.
sa-1110 developer ? s manual 11-143 peripheral control module the following table shows mcdr1. note that the transmit and receive telecom fifos are cleared when the sa-1110 is reset, or by writing a zero to mce (mcp disabled). also note that writes to reserved bits are ignored and reads return zeros. 11.12.5.3 mcp data register 2 mcdr2 contains 21 bits and is used to perform reads and writes to any of the ucb1100 ? s or ucb1200 ? s registers. mcdr2 contains three separate fields: mcdr2 15:0 is the 16-bit register data field, mcdr2 16 is a 1-bit read/write control bit, and mcdr2 20:17 is the 4-bit register address field. a value written to mcdr2 is placed in the correct position within the 64-bit subframe 0, is transmitted to the off-chip codec, and is used to perform a read or write operation to the addressed codec register. note that the contents of the addressed register are always returned in the receive data frame and placed in the mcdr2 regardless of the state of the read/write bit. thus for write cycles, both a write and a read occurs, and for read cycles, only a read occurs. when mcdr2 is read, the value returned from the last read or write operation, which was completed to the codec, is returned. a register write is performed by writing the correct value to each of the three fields within mcdr2 using one 16- or 32-bit write, ensuring that the read/write bit is set. its contents are then transferred to the correct fields within the serial shifter on the next rising edge of the sfrm signal, and then to the codec via the txd4 pin during subframe 0. the value within mcdr2 15:0 is written to the selected codec register at the end of subframe 0 (during the 65th bit of the frame). the data written 0h 8006 000c mcp data register 1: mcdr1 read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved bottom of telecom receive fifo 00 reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 read access 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved top of telecom transmit fifo 00 reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 write access bits name description 1..0 ? reserved for future enhancements. read ? data returned, but ucb1100 or ucb1200 currently zero fills these two bits. write ? mcp ? s transmit logic automatically zero fills these bits. 15..2 telecom data transmit/receive telecom fifo data. read ? bottom of telecom receive fifo data. write ? top of telecom transmit fifo data. 31..16 ? reserved.
11-144 sa-1110 developer ? s manual peripheral control module to the control register and its address is returned to the mcp during the next data frame, and is placed back within mcdr2 with the read/write bit reset to zero. for a write operation, since the addressed register is written at the end of subframe 0, the data returned during the frame in which the write occurred represents the previous contents of the register. the updated value is returned during the next data frame. a register read is performed by writing the address of the register to read while clearing the read/write bit to zero within mcdr2. again, the data is transferred to the serial shifter on the next rising edge of the sfrm signal and is transmitted to the ucb1100 or ucb1200 during subframe 0. because the address and read/write control bit fields are placed near the beginning of the serial stream output, the codec performs the read immediately after the read/write bit is received (during the 41st bit of the frame), and the value contained within the addressed register is sent back to the mcp in the same data frame, and is placed within mcdr2. once mcdr2 is written with a value to execute a read or write, the operation is performed every mcp data frame until a new value is written to the register. thus continual reads or writes are made to the addressed codec register until a new read or write operation is configured. the following table shows the location of mcp data register 2. note that the reset state of all mcdr2 bits is unknown (indicated by question marks), writes to reserved bits are ignored, and reads return zeros. 0h 8006 0010 mcp data register 2: mcdr2 read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved register address r/w 0 data value returned by a codec register read or write reset 0 0 0 0 0 0 0 0 0 0 0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? read access 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved register address r/w r/w data value to be written to the addressed codec register reset 0 0 0 0 0 0 0 0 0 0 0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? write access (sheet 1 of 2) bits name description 15..0 codec register read/write data codec register read/write data. read ? if a codec write was last performed, contains data of previous register access; next frame contains the data that was written. if a codec read was last performed, contains data from the read register. write ? used to specify what data to write to the addressed register, ignored for a codec register read.
sa-1110 developer ? s manual 11-145 peripheral control module 11.12.6 mcp status register the mcp status register (mcsr) contains bits that signal fifo overrun and underrun errors, and fifo service requests. each of these conditions signal an interrupt request to the interrupt controller. the status register also flags when transmit fifos are not full, when the receive fifos are not empty, when a codec control register read or write is complete, and when the audio or telecom portion of the codec is enabled (no interrupt generated). a bit that can cause an interrupt signals the interrupt request as long as the bit is set. once the bit is cleared, the interrupt is cleared. read/write bits are called status bits; read-only bits are called flags. status bits are referred to as ? sticky ? (once set by hardware, must be cleared by software). writing a one to a sticky status bit clears it; writing a zero has no effect. read-only flags are set and cleared by hardware; writes have no effect. additionally, some bits that cause interrupts have corresponding mask/enable bits in the control register and are indicated in the following section headings. note that the user has the ability to mask all mcp interrupts by clearing bit 18 within the interrupt controller mask register (icmr). see the section 9.2, ? interrupt controller ? on page 9-11 . 11.12.6.1 audio transmit fifo service request flag (ats) (read-only, maskable interrupt) the audio transmit fifo service request flag (ats) is a read-only bit that is set when the audio transmit fifo is nearly empty and requires service to prevent an underrun. ats is set any time the audio transmit fifo has four or fewer entries of valid data (half-full or less), and is cleared when it has five or more entries of valid data. when the ats bit is set, an interrupt request is made unless the audio transmit fifo interrupt request mask (ate) bit is cleared. the state of ats is also sent to the dma controller, and can be used to signal a dma service request. note that ate has no effect on the generation of the dma service request. after the dma or cpu fills the fifo such that four or more locations are filled within the audio transmit fifo, the ats flag (and the service request and/or interrupt) is automatically cleared. 16 r/w read/write. read ? returns a zero. write ? used to control whether the addressed register is read or written (write = 1, read = 0). 20..17 codec register read/write address codec register read/write address. read ? if a codec write was last performed, contains address of previous register access; next frame contains the address of the write. if a codec read was last performed, contains address of the register read. write ? used to address a register to perform a read or write. 31..21 ? reserved (sheet 2 of 2) bits name description
11-146 sa-1110 developer ? s manual peripheral control module 11.12.6.2 audio receive fifo service request flag (ars) (read-only, maskable interrupt) the audio receive fifo service request flag (ars) is a read-only bit that is set when the audio receive fifo is nearly filled and requires service to prevent an overrun. ars is set whenever the audio receive fifo has four or more entries of valid data (half-full or more), and is cleared when it has three or fewer (less than half-full) entries of data. when the ars bit is set, an interrupt request is made unless the audio receive fifo interrupt request mask (are) bit is cleared. the state of ars is also sent to the dma controller, and can be used to signal a dma service request. note that are has no effect on the generation of the dma service request. after the dma or cpu fills the fifo such that four or more locations are filled within the receive fifo, the ars flag (and the service request and/or interrupt) is automatically cleared. 11.12.6.3 telecom transmit fifo service request flag (tts) (read-only, maskable interrupt) the telecom transmit fifo service request flag (tts) is a read-only bit that is set when the telecom transmit fifo is nearly empty and requires service to prevent an underrun. tts is set whenever the telecom transmit fifo has four or fewer entries of valid data (half-full or less), and is cleared when it has five or more entries of valid data. when the tts bit is set, an interrupt request is made unless the telecom transmit fifo interrupt request mask (tte) bit is cleared. the state of tts is also sent to the dma controller, and can be used to signal a dma service request. note that tte has no effect on the generation of the dma service request. after the dma or cpu fills the fifo such that four or more locations are filled within the telecom transmit fifo, the tts flag (and the service request and/or interrupt) is automatically cleared. 11.12.6.4 telecom receive fifo service request flag (trs) (read-only, maskable interrupt) the telecom receive fifo service request flag (trs) is a read-only bit that is set when the telecom receive fifo is nearly filled and requires service to prevent an overrun. trs is set whenever the telecom receive fifo has four or more entries of valid data (half-full or more), and is cleared when it has three or fewer (less than half-full) entries of data. when the trs bit is set, an interrupt request is made unless the telecom receive fifo interrupt request mask (tre) bit is cleared. the state of trs is also sent to the dma controller, and can be used to signal a dma service request. note that tre has no effect on the generation of the dma service request. after the dma or cpu fills the fifo such that four or more locations are filled within the receive fifo, the trs flag (and the service request and/or interrupt) is automatically cleared. 11.12.6.5 audio transmit fifo underrun status (atu) (read/write, nonmaskable interrupt) the audio transmit fifo underrun status bit (atu) is set when the audio transmit logic attempts to fetch data from the fifo after it has been completely emptied. when an underrun occurs, the audio transmit logic continuously transmits the last valid audio value, which was transmitted before the underrun occurred. once data is placed in the fifo and it is transferred down to the bottom, the audio transmit logic uses the new value within the fifo for transmission. when the atu bit is set, an interrupt request is made.
sa-1110 developer ? s manual 11-147 peripheral control module 11.12.6.6 audio receive fifo overrun status (aro) (read/write, nonmaskable interrupt) the audio receive fifo overrun status bit (aro) is set when the audio receive logic attempts to place data into the audio receive fifo after it has been completely filled. each time a new piece of data is received, the set signal to the aro status bit is asserted, and the newly received data is discarded. this process is repeated for each new piece of data received until at least one empty fifo entry exists. when the aro bit is set, an interrupt request is made. 11.12.6.7 telecom transmit fifo underrun status (ttu) (read/write, nonmaskable interrupt) the telecom transmit fifo underrun status bit (ttu) is set when the telecom transmit logic attempts to fetch data from the fifo after it has been completely emptied. when an underrun occurs, the telecom transmit logic continuously transmits the last valid telecom value, which was transmitted before the underrun occurred. once data is placed in the fifo and it is transferred down to the bottom, the telecom transmit logic uses the new value within the fifo for transmission. when the ttu bit is set, an interrupt request is made. 11.12.6.8 telecom receive fifo overrun status (tro) (read/write, nonmaskable interrupt) the telecom receive fifo overrun status bit (tro) is set when the telecom receive logic places data into the telecom receive fifo after it has been completely filled. each time a new piece of data is received, the set signal to the tro status bit is asserted, and the newly received data is discarded. this process is repeated for each new piece of data received until at least one empty fifo entry exists. when the tro bit is set, an interrupt request is made. 11.12.6.9 audio transmit fifo not full flag (anf) (read-only, noninterruptible) the audio transmit fifo not full flag (anf) is a read-only bit that is set whenever the audio transmit fifo contains one or more entries that do not contain valid data and is cleared when the fifo is completely full. this bit can be polled when using programmed i/o to fill the audio transmit fifo over its halfway mark. this bit does not request an interrupt. 11.12.6.10 audio receive fifo not empty flag (ane) (read-only, noninterruptible) the audio receive fifo not empty flag (ane) is a read-only bit that is set whenever the audio receive fifo contains one or more entries of valid data and is cleared when it no longer contains any valid data. this bit can be polled when using programmed i/o to remove remaining bytes of data from the receive fifo because dma service and cpu interrupt requests are made only when four or more bytes reside within the fifo (3, 2, or 1 bytes may remain at the end of a frame). this bit does not request an interrupt.
11-148 sa-1110 developer ? s manual peripheral control module 11.12.6.11 telecom transmit fifo not full flag (tnf) (read-only, noninterruptible) the telecom transmit fifo not full flag (tnf) is a read-only bit that is set whenever the telecom transmit fifo contains one or more entries that do not contain valid data and is cleared when the fifo is completely full. this bit can be polled when using programmed i/o to fill the telecom transmit fifo over its halfway mark. this bit does not request an interrupt. 11.12.6.12 telecom receive fifo not empty flag (tne) (read-only, noninterruptible) the telecom receive fifo not empty flag (tne) is a read-only bit that is set whenever the telecom receive fifo contains one or more entries of valid data and is cleared when it no longer contains any valid data. this bit can be polled when using programmed i/o to remove remaining bytes of data from the receive fifo because dma service and cpu interrupt requests are made only when four or more bytes reside within the fifo (3, 2, or 1 bytes may remain at the end of a frame). this bit does not request an interrupt. 11.12.6.13 codec write completed flag (cwc) (read-only, noninterruptible) the codec write completed (cwc) flag is set after the following sequence occurs: a register write command is issued to the codec by writing to mcdr2; the write command is sent to the codec via subframe 0; the data value is latched within the addressed codec register at the beginning of subframe 1 (the 65th bit of the frame); the address and value that was written is returned to the mcp via the next subframe 0; and the returned values are latched in mcdr2. cwc is automatically cleared when mcdr2 is read or written. this bit does not request an interrupt. 11.12.6.14 codec read completed flag (crc) (read-only, noninterruptible) the codec read completed (crc) flag is set after the following sequence occurs: a register read command is issued to the codec by writing to mcdr2; the read command is sent to the codec via subframe 0; the data value contained within the addressed codec register is loaded into the codec ? s serial shift register during subframe 0 (the 41st bit of the frame); the address and value that was read is returned to the mcp via the same subframe 0; and the returned values are latched in mcdr2. crc is automatically cleared when mcdr2 is read or written. this bit does not request an interrupt. 11.12.6.15 audio codec enabled flag (ace) (read-only, noninterruptible) the audio codec enabled (ace) flag indicates when the audio codec input and/or output is enabled, which in turn, indicates that the audio sample rate counter is enabled. this flag is set after the following sequence occurs: a register write command is issued to audio control register b (register 8), and either bit 14 or 15 is set (aud_in_ena or aud_out_ena) by writing to mcdr2; the write command is sent to the codec via subframe 0; the data value is latched within codec register 8; and sfrm is asserted to indicate the start of the next frame. ace is automatically cleared using the same sequence with the exception that bits 14 and 15 are cleared, disabling both the input and output paths of the audio codec. this bit does not request an interrupt.
sa-1110 developer ? s manual 11-149 peripheral control module 11.12.6.16 telecom codec enabled flag (tce) (read-only, noninterruptible) the telecom codec enabled (tce) flag indicates when the telecom codec input and/or output is enabled, which in turn, indicates that the telecom sample rate counter is enabled. this flag is set after the following sequence occurs: a register write command is issued to telecom control register b (register 6), and either bit 14 or 15 is set (tel_in_ena or tel_out_ena) by writing to mcdr2; the write command is sent to the codec via subframe 0; the data value is latched within codec register 6; and sfrm is asserted to indicate the start of the next frame. tce is automatically cleared using the same sequence with the exception that bits 14 and 15 are cleared, disabling both the input and output paths of the telecom codec. this bit does not request an interrupt. the following table shows the bit locations corresponding to the status and flag bits within the mcp status register. mcsr contains a collection of read/write, read-only, interruptible, and noninterruptible bits (refer to the bit descriptions above). writes to read-only bits have no effect. the user must clear set status bits before enabling the mcp. note that writes to reserved bits are ignored and reads return zeros; question marks indicate that the values are unknown at reset. 0h 8006 0018 mcp status register: mcsr read/write and read-only 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved tce ace crc cwc tne tnf ane anf tro ttu aro atu trs tts ars ats 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 ? ? ? ? 0 0 0 0 (sheet 1 of 2) bits name description 0ats audio transmit fifo service request flag (read-only). 0 ? audio transmit fifo is more than half-full (five or more entries filled) or mcp disabled. 1 ? audio transmit fifo is half-full or less (four or fewer entries filled) and mcp operation is enabled, dma service request signalled, interrupt request signalled if not masked (if ate=1). 1ars audio receive fifo service request (read-only). 0 ? audio receive fifo is less than half-full (three or fewer entries filled) or mcp disabled. 1 ? audio receive fifo is half-full or more (four or more entries filled) and mcp operation is enabled, dma service request signalled, interrupt request signalled if not masked (if are=1). 2 tts telecom transmit fifo service request flag (read-only). 0 ? telecom transmit fifo is more than half-full (five or more entries filled) or mcp disabled. 1 ? telecom transmit fifo is half-full or less (four or fewer entries filled) and mcp operation is enabled, dma service request signalled, interrupt request signalled if not masked (if tte=1). 3trs telecom receive fifo service request (read-only). 0 ? telecom receive fifo is less than half full (three or fewer entries filled) or mcp disabled. 1 ? telecom receive fifo is half full or more (four or more entries filled) and mcp operation is enabled, dma service request signalled, interrupt request signalled if not masked (if tre=1). 4atu audio transmit fifo underrun. 0 ? audio transmit fifo has not experienced an underrun. 1 ? audio transmit logic attempted to fetch data from transmit fifo while it was empty request interrupt.
11-150 sa-1110 developer ? s manual peripheral control module 5aro audio receive fifo overrun. 0 ? audio receive fifo has not experienced an overrun. 1 ? audio receive logic attempted to place data into receive fifo while it was full, request interrupt. 6ttu telecom transmit fifo underrun. 0 ? telecom transmit fifo has not experienced an underrun. 1 ? telecom transmit logic attempted to fetch data from transmit fifo while it was empty, request interrupt. 7tro telecom receive fifo overrun. 0 ? telecom receive fifo has not experienced an overrun. 1 ? telecom receive logic attempted to place data into receive fifo while it was full, request interrupt. 8anf audio transmit fifo not full (read-only). 0 ? audio transmit fifo is full. 1 ? audio transmit fifo is not full. 9ane audio receive fifo not empty (read-only). 0 ? audio receive fifo is empty. 1 ? audio receive fifo is not empty. 10 tnf telecom transmit fifo not full (read-only). 0 ? telecom transmit fifo is full. 1 ? telecom transmit fifo is not full. 11 tne telecom receive fifo not empty (read-only). 0 ? telecom receive fifo is empty. 1 ? telecom receive fifo is not empty. 12 cwc codec write completed (read-only). 0 ? a write to a codec register has not completed since the last time this bit was cleared. 1 ? a write to a codec register has been transmitted and has updated the register. 13 crc codec read completed (read-only). 0 ? the value read from the addressed codec register has not been returned to mcdr2. 1 ? the value read from the addressed codec register is now in mcdr2. 14 ace audio codec enabled (read-only). 0 ? the audio codec input and output is disabled (bits 14 and 15 are 0 in audio control register b). 1 ? audio codec input and/or output is enabled (bits 14 and/or 15 is 1 in audio control register b). 15 tce telecom codec enabled. 0 ? the telecom codec input and output is disabled (bits 14 and 15 are 0 in telecom control register b). 1 ? telecom codec input and/or output is enabled (bits 14 and/or 15 is 1 in telecom control register b). 31..16 ? reserved. 0h 8006 0018 mcp status register: mcsr read/write and read-only 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved tce ace crc cwc tne tnf ane anf tro ttu aro atu trs tts ars ats 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 ? ? ? ? 0 0 0 0 (sheet 2 of 2) bits name description
sa-1110 developer ? s manual 11-151 peripheral control module 11.12.7 ssp operation following reset, both the mcp and ssp logic within serial port 4 is disabled and control of its pins is given to the ppc that configures all four pins as inputs. to enable ssp operation, the programmer should first clear any interruptible status bits, which are set following the reset by writing a one to them. next, the user should program the ssp ? s control registers with the desired mode of operation, ensuring that the register containing the ssp enable bit is programmed last. note that the mcp has precedence over the ssp and must be disabled first before enabling the ssp. the user can choose to either ? prime ? the transmit fifo by writing up to eight 16-bit values, or allow the transmit fifo service request to interrupt the cpu or trigger a dma transfer to fill the fifo. once enabled, transmission/reception of data begins on the transmit (txd4) and receive (rxd4) pins, and is synchronously controlled by the serial clock (sclk) and serial frame (sfrm) pins. 11.12.7.1 frame format each data frame is between 4 and 16 bits long depending on the size of data programmed, and is transmitted starting with the msb. there are three basic frame types that can be selected: motorola * spi, texas instruments * synchronous serial, and national microwire * . for all three formats, the serial clock (sclk) is held low or inactive, while the ssp is idle and transitions at the programmed frequency only during active transmission of data. for motorola* spi and national microwire* frame formats, the serial frame (sfrm) pin is active low, and is asserted (pulled down) during the entire frame ? s transmission. in these modes, the sfrm pin is used to select the off-chip slave serial device, enabling it for transmission. for texas instruments* format, the sfrm pin is pulsed for one serial clock period starting at its rising edge, prior to each frame ? s transmission. the type of serial clock edges used to drive and sample data are different for all three modes. for national microwire* format, both the ssp and the off-chip slave device drive their output data on the falling edge of sclk, and latch data from the other device on the rising edge. for texas instruments* format, both the ssp and the off-chip slave device drive their output data on the rising edge of sclk, and latch data from the other device on the falling edge. for motorola* spi format, the user has the option of which edge of sclk to drive and sample data, as well as the phase of the sclk signal (whether it is shifted one-half period to the left or right during the frame transmission). unlike the full-duplex transmission of the other two frame formats, the national microwire * format uses a special master-slave messaging technique that operates at half-duplex. in this mode, when a frame begins, an 8-bit control message is transmitted to the off-chip slave. during this transmit, no incoming data is received by the ssp. after the message has been sent, the off-chip slave decodes it and responds with the requested data after waiting one serial clock after the last bit of the 8-bit control message has been sent. the returned data can be 4 to 16 bits in length, making the total frame length anywhere from 13 to 25 bits.
11-152 sa-1110 developer ? s manual peripheral control module figure 11-33 shows the texas instruments * synchronous serial frame format for a single transmitted frame and when back-to-back frames are transmitted. in this mode, sclk and sfrm are forced low, and the transmit data line sa-1110. once the bottom entry of the transmit fifo contains data, sfrm is pulsed high for one sclk period and the value to be transmitted is transferred from the transmit fifo to the transmit logic ? s serial shift register. on the next rising edge of sclk, the msb of the 4- to 16-bit data frame is shifted to the txd4 pin. likewise, the msb of the received data is shifted onto the rxd4 pin by the off-chip serial slave device. both the ssp and the off-chip serial slave device then latch each data bit into their serial shifter on the falling edge of each sclk. the received data is transferred from the serial shifter to the receive fifo on the first rising edge of sclk after the lsb has been latched. note that the transmit pin retains the last value it transmits (the value of bit 0, when the frame completes and the ssp enters idle mode). if the ssp is disabled or a reset occurs, the transmit pin is reset to zero. figure 11-33. texas instruments * synchronous serial frame format . sclk ... sfrm ... txd4 bit n bit n..1 ... bit 1 bit 0 rxd4 bit n bit n..1 ... bit 1 bit 0 msb 4 to 16 bits lsb single transfer sclk ... ... sfrm ... ... tx/rx bit 0 bit n bit n..1 ... bit 1 bit 0 bit n bit n..1 ... bit 1 bit 0 continuous transfers
sa-1110 developer ? s manual 11-153 peripheral control module figure 11-34 shows one of the four possible configurations for the motorola* spi frame format for a single transmitted frame and when back-to-back frames are transmitted. in this mode, sclk and the transmit data line (txd4) are forced low and sfrm is forced high, whenever the ssp is disabled or the sa-1110 is reset. once the bottom entry of the transmit fifo contains data, sfrm is pulled low and remains low for the duration of the frame ? s transmission. the falling edge of sfrm causes the value for transmission to be transferred from the bottom transmit fifo entry to the transmit logic ? s serial shift register, and the msb of the 4- to 16-bit data frame is shifted onto the txd4 pin a half an sclk period later (note that the sclk pin does not transition at this point). the msb of the received data is shifted onto the rxd4 pin by the off-chip serial slave device as soon as the serial framing signal goes low. both the ssp and the off-chip serial slave device then latch each data bit into their serial shifter on the rising edge of each sclk. at the end of the frame, the sfrm pin is pulled high one sclk period after the last bit has been latched in the receive serial shifter, which causes the data to be transferred to the receive fifo. note that the off-chip slave device can tristate the receive line either on the falling edge of sclk after the lsb has been latched by the receive shifter or when the sfrm pin goes high. also note that the transmit pin retains the last value it transmits (the value of bit 0, when the frame completes and the ssp enters idle mode). if the ssp is disabled or a reset occurs, the transmit pin is reset to zero. all four frame programming options are described in the ssp control register 1 section. for continuous transfers, data transmission begins and ends in the same manner as a single transfer; however, the sfrm line is continuously asserted (held low) and transmission of data occurs back-to-back (the msb of the next frame follows directly after the lsb of the previous frame). in this example, each of the received data values is transferred from the receive shifter to the receive fifo on the falling edge sclk after the lsb of the frame has been latched into the ssp. figure 11-34. motorola * spi frame format sclk ... sfrm ... txd4 bit n bit n..1 ... bit 1 bit 0 rxd4 bit n bit n..1 ... bit 1 bit 0 msb 4 to 16 bits lsb single transfer sclk ... ... sfrm ... ... tx/rx bit 0 bit n bit n..1 ... bit 1 bit 0 bit n bit n..1 ... bit 1 bit 0 continuous transfers note : the phase and polarity of sclk can be configured for four different modes. this example shows just one of those modes. see the section 11.12.10, ? ssp control register 1 ? on page 11-159 for a complete description of each mode .
11-154 sa-1110 developer ? s manual peripheral control module figure 11-35 shows the national microwire * frame format for a single transmitted frame and when back-to-back frames are transmitted. microwire format is very similar to spi format, except that transmission is half- instead of full-duplex, using a master-slave message passing technique. each serial transmission begins with an 8-bit control word that is transmitted from the ssp to the off-chip slave device. during this transmit, no incoming data is received by the ssp. after the message has been sent, the off-chip slave decodes it and responds with the requested data after waiting one serial clock after the last bit of the 8-bit control message has been sent. the returned data is 4 to 16 bits in length, making the total frame length anywhere from 13 to 25 bits. sclk and the transmit data line (txd4) is forced low, and sfrm is forced high whenever the ssp is disabled or following a reset of the sa-1110. once enabled, transmission is triggered by writing a control byte to the transmit fifo. the falling edge of sfrm causes the value contained within the bottom entry of the transmit fifo to be transferred to the transmit logic ? s serial shift register and the msb of the 8-bit control frame to be shifted onto the txd4 pin. sfrm remains low for the duration of the frame ? s transmission. the rxd4 pin remains tristated during this transmission. the off-chip serial slave device latches each control bit into its serial shifter on the rising edge of each sclk. after the last bit is latched by the slave device, the control byte is decoded during a one-clock waitstate, and the slave responds by transmitting data back to the ssp, driving each bit onto the rxd4 line on the falling edge of sclk. the ssp, in turn, latches each bit on the rising edge of sclk. at the end of the frame, for single transfers, the sfrm signal is pulled high one sclk period after the last bit has been latched in the receive serial shifter, which causes the data to be transferred to the receive fifo. note that the off-chip slave device can tristate the receive line either on the falling edge of sclk after the lsb has been latched by the receive shifter or when the sfrm pin goes high. also note that the transmit pin retains the last value it transmits (the value of bit 0, when the frame completes and the ssp enters idle mode). if the ssp is disabled or a rest occurs, the transmit pin is reset to zero. for continuous transfers, data transmission begins and ends in the same manner as a single transfer; however, the sfrm line is continuously asserted (held low) and transmission of data occurs back-to-back (the control byte of the next frame follows directly after the lsb of the received data from the previous frame). each of the received data values is transferred from the receive shifter on the falling edge sclk after the lsb of the frame has been latched into the ssp. figure 11-35. national microwire * frame format sclk ... ... sfrm ... ... txd4 bit 7 ... bit 0 ... 8-bit control 1 clk rxd4 ... bit n ... bit 0 4 to 16 bits single transfer sclk ... ... ... sfrm ... ... ... txd4 bit 0 ... bit 7 ... bit 0 ... 1 clk 1 clk rxd4 bit n ... bit 0 ... bit n ... bit 0 continuous transfers
sa-1110 developer ? s manual 11-155 peripheral control module 11.12.7.2 baud rate generation the baud or bit rate is derived by dividing down the 3.6864-mhz clock generated by the on-chip pll. the clock is first divided by a fixed value of 2 and then by a programmable number between 1 and 256. this programmability provides a range of transmission rates ranging from 7.2 kbps to 1.8432 mbps. the resultant clock is used to drive the sclk pin and by the transmit and receive logic ? s serial shifters to drive and latch data, respectively. 11.12.7.3 ssp transmit and receive fifos to reduce chip size as well as power consumption, the ssp ? s fifos use self-timed logic (they are not clocked). because of process and environmental variations, the depth at which a service request is triggered to empty the receive fifo is variable. this variation spans a maximum of four fifo entries, thus the receive fifo service request can be made at four different fifo depths. to compensate for this variability and guarantee that at least four valid entries of data exist within the fifo before generating a service request, an extra four entries have been added to the receive fifo (four entries more than the transmit fifo). thus the transmit fifo is 8 entries deep and the receive fifo is 12 entries deep. the point at which the receive fifo service request is triggered spans one-third (four entries) of the 12-entry fifo. the service request is signalled at a depth from one-third full to two-thirds full (when the fifo contains five, six, seven, or eight entries of data). this service request variation only applies to an empty fifo that is filled (receive fifo). it does not apply to a full fifo that is emptied (transmit fifo). thus the transmit fifo is guaranteed to signal a service request when it has four or more empty entries and negate the request when the fifo contains five or more entries that are filled. if the dma is used to service either one or both of the ssp ? s fifos, the burst size must be set to four half-words, even though more than four entries of data may exist within the receive fifo. if programmed i/o is used to service the fifos, a maximum of four words may be added to the transmit fifo without checking if more space is available. likewise, a maximum of four words may be removed from the receive fifo without checking if more data is available. after this point, the user must poll a set of status bits, which indicates if any data remains in the receive fifo or if space is available in the transmit fifo, before emptying or filling the fifos any further. the width of each entry within the fifos is 16 bits. however, the ssp supports data sizes of 4 through 16 bits. any data that is less than 16-bits wide must be left-justified when writing or dmaing data to the transmit fifo. likewise, data received by the ssp is left-justified when it is placed within the receive fifo. figure 11-36 shows the required data alignment for the transmit and receive fifos. the user must left-justify data to be transmitted, and shift received data to the right before using the results. figure 11-36. transmit/receive fifo data format bit1514131211109876543210 4-bit data 000000000000 5-bit data 00000000000 .. 15-bit data 0 16-bit data
11-156 sa-1110 developer ? s manual peripheral control module 11.12.7.4 cpu and dma register access sizes bit positioning, byte ordering, and addressing of the ssp are described in terms of little endian ordering. all ssp registers are 16-bits wide and are located in the least significant half-word of individual words. the arm peripheral bus does not support byte or half-word operations. all reads and writes of the ssp by the cpu should be word wide. two separate dedicated dma requests exist for both the transmit and the receive fifo. if the dma controller is used to service the transmit and/or receive fifos, the user must ensure the dma is properly configured to perform half-word wide accesses, using four half-words per burst (half the size of the fifos). byte-wide dma accesses for data widths of 4..8 bits are not permitted. for all data sizes 4..16 bits, the user must left-justify the data within each individual half-word in external memory for the dma, starting with the most significant bit. likewise, when using programmed i/o to service the ssp ? s transmit fifo, the user must also left-justify the data written or read to/from the data register. note that a separate set of registers also exist to configure mcp operation. see the following sections for a full description of programming and operation of serial port 4 as an mcp, a summary of serial port 4 ? s mcp registers, and for a summary of its ssp registers. 11.12.7.5 alternate ssp pin assignment if the ssp and mcp both need to be used at the same time, general-purpose i/o pins 10 through 13 (gpio 10-13) can be reassigned by programming the ppc pin assignment register (ppar). this allows the mcp dedicated use of the four pins assigned to serial port 4, and the ssp dedicated use of the gpio pins. when the ssp pin reassignment (spr) bit is set in ppar, the following pin assignments are made: gpio 10 is used for transmit, gpio 11 for receive, gpio 12 for serial clock, and gpio 13 for serial frame. note that the user must also set bits 10 through 13 in the gpio alternate function register (gafr) as well as set bits 10, 12, and 13 and clear bit 11 in the gpio pin direction register (gpdr). once the reassignment is made, these pins are no longer usable by the gpio unit. see the section 9.1, ? general-purpose i/o ? on page 9-1 for a description of how to program the system control module and the section 11.13, ? peripheral pin controller (ppc) ? on page 11-167 for a description of how to program the ppc unit. 11.12.8 ssp register definitions there are four registers within the ssp: two control registers, one data register, and one status register. the control registers are used to program the baud rate, data length, and frame format, and to select whether the cpu or dma is used to service the ssp, and to enable/disable operation. the data register is 16 bits and addresses both the transmit and receive buffers. a read accesses the receive buffer; a write accesses the transmit buffer. note that these are two physically separate buffers to allow full-duplex transmission. the status register contains bits that signal an overrun error, a transmit buffer service request, and a receive buffer service request. each of these status conditions signal an interrupt request to the interrupt controller. the status register also flags when the ssp is actively transmitting data, when the transmit fifo is not full, and when the receive fifo is not empty (no interrupt generated). 11.12.9 ssp control register 0 the ssp control register 0 (sscr0) contains four different bit fields that control various functions within the ssp.
sa-1110 developer ? s manual 11-157 peripheral control module 11.12.9.1 data size select (dss) the 4-bit data size select (dss) field is used to select the size of the data transmitted and received by the ssp. data can be 4 to 16 bits in length. when data is programmed to be less than 16 bits, received data is automatically right justified and the upper bits in the receive fifo are zero filled by the receive logic. transmit data must be right justified by the user before being placed into the transmit fifo; however, the upper unused bits are ignored by the ssp ? s transmit logic. although it is possible to program data sizes of 1, 2, and 3 bits, these sizes are reserved and produce unpredictable results in the ssp. when national microwire * frame format is selected, this bit field selects the size of the received data. note that the size of the transmitted data is always 8 bits in this mode. 11.12.9.2 frame format (frf) the 2-bit frame format (frf) bit field is used to select which frame format to use: motorola * spi (frf=00), texas instruments * synchronous serial (frf=01), or national microwire * (frf=10). see the preceding sections for a complete description of each frame format. note that frf=11 is reserved and produces unpredictable results. 11.12.9.3 synchronous serial port enable (sse) the ssp enable (sse) bit is used to enable and disable all ssp operation. when sse=0, the ssp is disabled; when sse=1, it is enabled. since the mcp and ssp both share the same pins, only one can be enabled at a time. if the user enables both at the same time, the mcp has precedence and the ssp remains disabled. however, both can be enabled when the ssp pin reassignment (spr) bit within the ppc unit is set, which assigns the ssp to gpio pins. when the ssp is disabled, all of its clocks are powered down to minimize power consumption. if the mcp is also disabled, the txd4, rxd4, sclk, and sfrm pins can be used for general-purpose input/output. see the section 11.13, ? peripheral pin controller (ppc) ? on page 11-167 for a description of how to program the ppc unit to reassign the ssp ? s pins and use serial port 4 ? s pins as i/os. note that sse is the only control bit within the ssp that is reset to a known state. it is cleared to zero to ensure the ssp is disabled following a reset of the sa-1110. when the sse bit is cleared during active operation, the ssp is disabled immediately, causing the current frame, which is being transmitted, to be terminated and control of serial port 4 ? s pins to be given to the ppc unit. clearing sse resets the ssp ? s fifos. however the ssp ? s control and status registers are not reset. the user must ensure these registers are properly reconfigured before reenabling the ssp.
11-158 sa-1110 developer ? s manual peripheral control module 11.12.9.4 serial clock rate (scr) the 8-bit serial clock rate (scr) bit field is used to select the baud or bit rate of the ssp. a total of 256 different bit rates can be selected, ranging from a minimum of 7.2 kbps to a maximum of 1.8432 mbps. the serial clock generator uses the 3.6864-mhz clock produced by the on-chip pll, divided by a fixed value of 2, and then the programmable scr value to generate the serial clock (sclk). the resultant clock rate is driven out on the sclk pin and is also used by the ssp ? s transmit logic to drive data out on the txd4 pin, and latch data on the rxd4 pin. depending on the frame format selected, each transmitted bit is either driven on the rising or falling edge of sclk, and is sampled on the opposite clock edge. the resultant serial clock rate, given a specific scr value or required scr value given a desired bit rate, can be calculated using the following two respective equations, where scr is the decimal equivalent of the binary value programmed within the bit field: the following table shows the bit locations corresponding to the five different control bit fields within ssp control register 0. note that the sse bit is the only control bit that is reset to a known state to ensure the ssp is disabled following a reset of the sa-1110. the reset state of all other control bits is unknown (indicated by question marks) and must be initialized before enabling the ssp. reads of bit 6, which is reserved, return zero; writes have no effect. bitrate 3.6864 6 10 2 x scr 1 + () ----------------------------------- = scr 3.6864 6 10 2 x bitrate ------------------------------ -1 ? = 0h 8007 0060 ssp control register 0: sscr0 read/write 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 scr sse reserved frf dss ? ? ? ? ? ? ? ? 0 0 ? ? ? ? ? ? (sheet 1 of 2) bits name description 3..0 dss data size select. 0000 ? reserved, undefined operation. 0001 ? reserved, undefined operation. 0010 ? reserved, undefined operation. 0011 ? 4-bit data. 0100 ? 5-bit data. 0101 ? 6-bit data. 0110 ? 7-bit data. 0111 ? 8-bit data. 1000 ? 9-bit data. 1001 ? 10-bit data. 1010 ? 11-bit data. 1011 ? 12-bit data. 1100 ? 13-bit data. 1101 ? 14-bit data. 1110 ? 15-bit data. 1111 ? 16-bit data. 5..4 frf frame format. 00 ? motorola spi frame format. 01 ? texas instruments synchronous serial frame format. 10 ? national microwire frame format. 11 ? reserved, undefined operation. 6 ? reserved.
sa-1110 developer ? s manual 11-159 peripheral control module 11.12.10 ssp control register 1 the ssp control register 1 (sscr1) contains six different bit fields that control various functions within the ssp. 11.12.10.1 receive fifo interrupt enable (rie) the receive fifo interrupt enable (rie) bit is used to mask or enable the receive fifo service request interrupt. when rie=0, the interrupt is masked and the state of the receive fifo service request (rfs) bit within the ssp status register is ignored by the interrupt controller. when rie=1, the interrupt is enabled, and whenever rfs is set (one), an interrupt request is made to the interrupt controller. note that programming rie=0 does not affect the current state of rfs or the receive fifo logic ? s ability to set and clear rfs, it only blocks the generation of the interrupt request. also note that rie does not affect generation of the receive fifo dma request, which is asserted whenever rfs=1. 11.12.10.2 transmit fifo interrupt enable (tie) the transmit fifo interrupt enable (tie) bit is used to mask or enable the transmit fifo service request interrupt. when tie=0, the interrupt is masked and the state of the transmit fifo service request (tfs) bit within the ssp status register is ignored by the interrupt controller. when tie=1, the interrupt is enabled, and whenever tfs is set (one), an interrupt request is made to the interrupt controller. note that programming tie=0 does not affect the current state of tfs or the transmit fifo logic ? s ability to set and clear tfs; it only blocks the generation of the interrupt request. also note that tie does not affect generation of the transmit fifo dma request, which is asserted whenever tfs=1. 7sse synchronous serial port enable. 0 ? ssp operation disabled, control of pins given to ppc if mcp is also disabled. 1 ? ssp operation enabled if mcp disabled or if the ppc ssp pin reassignment bit is set (reassigns gpio 13..10 to the ssp). 15..8 scr serial clock rate. value (from 0 to 255) used to generate the transmission rate of the ssp. bit rate = 3.6864x10 6 /(2x(scr+1)), where scr is a decimal value. 0h 8007 0060 ssp control register 0: sscr0 read/write 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 scr sse reserved frf dss ? ? ? ? ? ? ? ? 0 0 ? ? ? ? ? ? (sheet 2 of 2) bits name description
11-160 sa-1110 developer ? s manual peripheral control module 11.12.10.3 loopback mode (lbm) the loopback mode (lbm) bit is used to enable and disable the ability of the ssp transmit and receive logic to communicate. when lbm=0, the ssp operates normally. the transmit and receive data paths are independent and communicate via their respective pins. when lbm=1, the output of the transmit serial shifter is directly connected to the input of the receive serial shifter internally and control of the txd4, rxd4, sclk, and sfrm pins are given to the peripheral pin control (ppc) unit. 11.12.10.4 serial clock polarity (spo) the serial clock polarity (spo) bit selects the polarity or active/inactive state of the serial clock (sclk) pin when motorola* spi format is selected (frf=00). when spo=0, the inactive or idle state of sclk is low. thus when the ssp is not actively transmitting/receiving data, the sclk pin is held low. when spo=1, the inactive or idle state of sclk is high. thus when the ssp is not actively transmitting/receiving data, the sclk pin is held high. the programming of spo alone does not determine which sclk edges are used to drive and latch data to or from the transmit and receive pins. the programming of spo and the serial clock phase (sph) bit determines this. note that spo is ignored in all other modes except motorola * spi format (frf=00). 11.12.10.5 serial clock phase (sph) the serial clock phase (sph) bit selects the phase relationship of the serial clock (sclk) signal with the serial frame (sfrm) signal when motorola* spi format is selected (frf=00). when sph=0, sclk remains in its inactive state (as programmed by spo) for one full sclk period duration after sfrm is asserted (driven low). sclk continues to transition during the entire frame and is driven to its inactive state one-half sclk period duration before sfrm is negated (driven high). when sph=1, sclk remains in its inactive state (as programmed by spo) for one-half sclk period duration after sfrm is asserted (driven low). sclk continues to transition during the entire frame and is driven to its inactive state one full sclk period duration before sfrm is negated (driven high). using sph and spo together determine when sclk is active during the assertion of sfrm and which edge of sclk is used to drive data to the transmit pin as well as latch data from the receive pin. when spo and sph are the same value (both 0 or both 1), transmit data is driven on the falling edge of sclk and receive data is latched on the rising edge of sclk. alternatively, when spo and sph are of opposite value (one 0 and the other 1), transmit data is driven on the rising edge of sclk and receive data is latched on the falling edge of sclk. note that sph is ignored in all other modes, except motorola* spi format (frf=00). figure 11-37 shows the pin timing for all four programming combinations of spo and sph. note that spo inverts the polarity of the sclk signal, and sph determines the phase relationship between sclk and sfrm, shifting the sclk signal one-half phase to the left or right during the assertion of sfrm.
sa-1110 developer ? s manual 11-161 peripheral control module figure 11-37. motorola * spi frame formats for spo and sph programming 11.12.10.6 external clock select (ecs) the external clock select (ecs) bit selects whether the on-chip 3.6864-mhz clock is used by the ssp or if an off-chip clock is supplied via gpio pin 19. when ecs=0, the ssp uses the on-chip 3.6864-mhz clock to produce a range of serial transmission rates ranging from 7.2 kbps to a maximum of 1.8432 mbps. when ecs=1, the ssp uses gpio 19 to input a clock supplied from off-chip. the frequency of the off-chip clock can be any value up to 3.6864 mhz. this off-chip clock is useful when a serial transmission rate, which is not an even multiple of 3.6864 mhz, is required for synchronization with the target off-chip slave device. when using gpio pin 19 for the input clock, the user must also set bit 19 of the gpio alternate function register (gafr), and clear bit 19 of the gpio pin direction register (gpdr). see the system control module chapter. the following table shows the bit locations corresponding to the three different control bit fields within ssp control register 1. the reset state of all bits is unknown (indicated by question marks) and must be initialized before enabling the ssp. note that writes to reserved bits are ignored and reads return zero. sclk spo=0 ... sclk spo=1 ... sfrm ... txd4 bit n bit n.. ... bit 1 bit 0 rxd4 bit n bit n.. ... bit 1 bit 0 msb 4 to 16 bits lsb sph = 0 sclk spo=0 ... sclk spo=1 ... sfrm ... txd4 bit n bit n.. ... bit 1 bit 0 rxd4 bit n bit n.. ... bit 1 bit 0 msb 4 to 16 bits lsb sph = 1
11-162 sa-1110 developer ? s manual peripheral control module 11.12.11 ssp data register the ssp data register (ssdr) is 16 bits wide and corresponds to the top and bottom entries of the transmit and receive fifos, respectively. when ssdr is read, the bottom entry of receive fifo is accessed. as data is removed by the ssp ? s receive logic from the incoming data frame, it is placed into the top entry of the receive fifo and is transferred down an entry at a time until it reaches the last empty location within the fifo. data is removed by reading ssdr, which accesses the bottom entry of the fifo. after ssdr is read, the bottom entry is invalidated, and all remaining values within the fifo automatically transfer down one location. 0h 8007 0064 ssp control register 1: sscr1 read/write 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved ecs sph spo lbm tie rie 0 0 0 0 0 0 0 0 0 0 ? ? ? ? ? ? bits name description orie receive fifo interrupt enable. 0 ? receive fifo one- to two-thirds full or more condition does not generate an interrupt (rfs bit ignored). 1 ? receive fifo one- to two-thirds full or more condition generates an interrupt (state of rfs sent to interrupt controller). 1tie transmit fifo interrupt enable. 0 ? transmit fifo half-full or less condition does not generate an interrupt (tfs bit ignored). 1 ? transmit fifo half-full or less condition generates an interrupt (state of tfs sent to interrupt controller). 2lbm loopback mode. 0 ? normal serial port operation enabled. 1 ? output of transmit serial shifter is connected to input of receive serial shifter internally and control of txd4, rxd4, sclk, and sfrm pins is given to the ppc unit. 3spo serial clock polarity. 0 ? the inactive or idle state of sclk is low. 1 ? the inactive or idle state of sclk is high. 4sph serial clock phase. 0 ? sclk is in its inactive state one full cycle at the start of the frame and one-half cycle at the end of the frame. 1 ? sclk is in its inactive state one-half cycle at the start of the frame and one full cycle at the end of the frame. 5ecs external clock select. 0 ? integrated clock generates the ssp serial clock and controls all timing. 1 ? clock input using gpio pin 19 to drive the serial clock and all timing when serial rates that are not a multiple of 3.6864 mhz are needed. note that bit 19 within gfar and gpdr must be correctly configured within the system control module. 15..6 ? reserved.
sa-1110 developer ? s manual 11-163 peripheral control module when ssdr is written, the topmost entry of the transmit fifo is accessed. after a write, data is automatically transferred down to the lowest location within the transmit fifo, which does not already contain valid data. data is removed from the bottom of the fifo one value at a time by the transmit logic, is loaded into the transmit serial shifter, and then is serially shifted onto the txd4 pin at the programmed bit rate. when a data size of less than 16 bits is selected, the user should left justify data written to the transmit fifo. the transmit logic ignores the upper unused bits. received data less than 16 bits is automatically right justified in the receive buffer and unused bits are zero filled. when the ssp is programmed for national microwire * frame format, the default size for transmit data is 8 bits (the most significant byte is ignored) and the receive data size is controlled by the programmer. the following table shows the location of the ssp data register. note that both fifos are cleared when the sa-1110 is reset or by writing a zero to sse (ssp disabled). 0h 8007 006c ssp data register: ssdr read/write 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 bottom of receive fifo reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 read access 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 top of receive fifo reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 write access bits name description 15..0 data top/bottom of transmit/receive fifo. read ? bottom of receive fifo. write ? top of transmit fifo. note: user should left justify data when ssp programmed for a data size less than 16 bits. top unused bits are ignored by transmit logic. receive logic automatically right justifies data and zero fills unused bits.
11-164 sa-1110 developer ? s manual peripheral control module 11.12.12 ssp status register the ssp status register (sssr) contains bits that signal overrun errors as well as the transmit and receive fifo service requests. each of these hardware-detected events signals an interrupt request to the interrupt controller. the status register also contains flags that indicate when the ssp is actively transmitting characters, when the transmit fifo is not full, and when the receive fifo is not empty (no interrupt generated). a bit that can cause an interrupt signals the interrupt request as long as the bit is set. once the bit is cleared, the interrupt is cleared. read/write bits are called status bits; read-only bits are called flags. status bits are referred to as ? sticky ? (once set by hardware, must be cleared by software). writing a one to a sticky status bit clears it; writing a zero has no effect. read-only flags are set and cleared by hardware; writes have no effect. additionally, some bits that cause interrupts have corresponding mask/enable bits in the control registers and are indicated in the following section headings. note that the user has the ability to mask all ssp interrupts by clearing bit 19 within the interrupt controller mask register (icmr). see the section 9.2, ? interrupt controller ? on page 9-11 . 11.12.12.1 transmit fifo not full flag (tnf) (read-only, noninterruptible) the transmit fifo not full flag (tnf) is a read-only bit that is set whenever the transmit fifo contains one or more entries that do not contain valid data and is cleared when the fifo is completely full. this bit can be polled when using programmed i/o to fill the transmit fifo over its halfway mark. this bit does not request an interrupt. 11.12.12.2 receive fifo not empty flag (rne) (read-only, noninterruptible) the receive fifo not empty flag (rne) is a read-only bit that is set whenever the receive fifo contains one or more entries of valid data and is cleared when it no longer contains any valid data. this bit can be polled when using programmed i/o to remove remaining bytes of data from the receive fifo because dma service and cpu interrupt requests are only made when four or more bytes reside within the fifo (3, 2, or 1 bytes may remain at the end of a frame). this bit does not request an interrupt. 11.12.12.3 ssp busy flag (bsy) (read-only, noninterruptible) the ssp busy (bsy) flag is a read-only bit that is set when the ssp is actively transmitting and/or receiving data, and is cleared when the ssp is idle or disabled (sse=0). this bit does not request an interrupt. 11.12.12.4 transmit fifo service request flag (tfs) (read-only, maskable interrupt) the transmit fifo service request flag (tfs) is a read-only bit that is set when the transmit fifo is nearly empty and requires service to prevent an underrun. tfs is set whenever the transmit fifo has four or fewer entries of valid data (half-full or less), and is cleared when it has five or more entries of valid data. when the tfs bit is set, an interrupt request is made unless the transmit fifo interrupt request enable (tie) bit is cleared. the state of tfs is also sent to the dma controller, and can be used to signal a dma service request. note that tie has no effect on the generation of the dma service request. after the dma or cpu fills the fifo such that four or more locations are filled within the transmit fifo, the tfs flag (and the service request and/or interrupt) is automatically cleared.
sa-1110 developer ? s manual 11-165 peripheral control module 11.12.12.5 receive fifo service request flag (rfs) (read-only, maskable interrupt) the receive fifo service request flag (rfs) is a read-only bit that is set when the receive fifo is nearly filled and requires service to prevent an overrun. rfs is set whenever the receive fifo has four or more entries of valid data (half-full or more), and is cleared when it has three or fewer (less than half-full) entries of data. when the rfs bit is set, an interrupt request is made unless the receive fifo interrupt request enable (rie) bit is cleared. the state of rfs is also sent to the dma controller, and can be used to signal a dma service request. note that rie has no effect on the generation of the dma service request. after the dma or cpu fills the fifo such that four or more locations are filled within the receive fifo, the rfs flag (and the service request and/or interrupt) is automatically cleared. 11.12.12.6 receiver overrun status (ror) (read/write, nonmaskable interrupt) the receiver overrun status bit (ror) is a read/write bit that is set when the receive logic attempts to place data into the receive fifo after it has been completely filled. each time a new piece of data is received, the set signal to the ror bit is asserted, and the newly received data is discarded. this process is repeated for each new piece of data received until at least one empty fifo entry exists. when the ror bit is set, an interrupt request is made. the following table shows the bit locations corresponding to the status and flag bits within the ssp status register. all bits are read-only except ror, which is read/write. writes to tnf, rne, bsy, tfs, and rfs have no effect. the reset state of ror is unknown (indicated by a question mark) and must be initialized before enabling the ssp. note that writes to reserved bits are ignored and reads return zeros. 0h 8007 0074 ssp status register: sssr read/write and read-only 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved ror rfs tfs bsy rne tnf reserved 0 0 0 0 0 0 0 0 0 ? 0 0 0 0 1 0 (sheet 1 of 2) bits name description 0 ? reserved. 1tnf transmit fifo not full (read-only). 0 ? transmit fifo is full. 1 ? transmit fifo is not full. 2 rne receive fifo not empty (read-only). 0 ? receive fifo is empty. 1 ? receive fifo is not empty. 3bsy ssp busy flag (read-only). 0 ? ssp is idle or disabled. 1 ? ssp is currently transmitting and/or receiving a frame (no interrupt generated). 4 tfs transmit fifo service request (read-only). 0 ? transmit fifo is more than half-full (five or more entries filled) or ssp disabled. 1 ? transmit fifo is half-full or less (four or fewer entries filled) and ssp operation is enabled, dma service request signalled, interrupt request signalled if not masked (if tie=1).
11-166 sa-1110 developer ? s manual peripheral control module 11.12.13 mcp register locations table 11-19 shows the registers associated with the mcp and the physical addresses used to access them. 5rfs receive fifo service request (read-only). 0 ? receive fifo is less than half-full (three or fewer entries filled) or ssp disabled. 1 ? receive fifo is half-full or more (four or more entries filled) and ssp operation is enabled, dma service request signalled, interrupt request signalled if not masked (if rie=1). 6ror receive fifo overrun. 0 ? receive fifo has not experienced an overrun. 1 ? receive logic attempted to place data into receive fifo while it was full, request interrupt. 15..7 ? reserved. 0h 8007 0074 ssp status register: sssr read/write and read-only 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved ror rfs tfs bsy rne tnf reserved 0 0 0 0 0 0 0 0 0 ? 0 0 0 0 1 0 (sheet 2 of 2) bits name description table 11-19. mcp control, data, and status register locations address name description 0h 8006 0000 mccr0 mcp control register 0 0h 8006 0004 ? reserved 0h 8006 0008 mcdr0 mcp data register 0 0h 8006 000c mcdr1 mcp data register 1 0h 8006 0010 mcdr2 mcp data register 2 0h 8006 0014 ? reserved 0h 8006 0018 mcsr mcp status register 0h 8006 001c ? 0h 8006 005c ? reserved note : mccr1 resides within the same address space as the ppc. 0h 9006 0030 mccr1 mcp control register 1
sa-1110 developer ? s manual 11-167 peripheral control module 11.12.14 ssp register locations table 11-20 shows the registers associated with the ssp and the physical addresses used to access them. 11.13 peripheral pin controller (ppc) the peripheral pin controller (ppc) takes individual control of the lcd ? s and serial port 1..4 ? s pins when one or more of the units are disabled, allowing the user to utilize them as general-purpose digital i/o pins to communicate to off-chip resources. when controlled by the ppc, peripheral control module (pcm) pins operate similarly to gpio pins except that they cannot perform edge detection and interrupt generation. the ppc is also used to specify the direction of the peripherals ? pins when sleep mode is entered. note that serial ports 1..3 contain individual enables for their transmit and receive serial engines. thus, if only half-duplex transmission is needed, one pin can be used for serial communication and the other for digital i/o communication. also note that serial port 0 ? s pins are dedicated to the usb device controller (udc), which uses the pins to drive a differential transceiver, preventing them from being used as digital i/o pins when the udc is disabled. 11.13.1 ppc operation following a hardware reset of the sa-1110 (nreset asserted then negated), all peripheral control module units are disabled, giving control of their pins to the ppc (except serial port 0). the ppc, in turn, configures all peripheral pins it controls as inputs. once reset is negated, the user should program the peripherals as soon as possible, and configure the pins of any peripheral that is not usable to function as general-purpose i/o signals. this should be done quickly to limit the amount of power consumed at startup because pins that are intended to function as outputs within the system are initially configured as inputs, and the receiving device to which they are connected will float and consume power. the ppc contains special resources to limit off-chip power consumption during and immediately following the assertion of sleep mode. the ppc contains a sleep mode direction register, which is programmed by the user, and individually configures 22 of the peripherals ? pins either as inputs or outputs during sleep mode. when configured as an output, the pin is forced low in sleep mode. this special register is required because the first action taken when sleep mode is entered is the assertion of reset to all the peripherals, which would, in turn, errantly configure all peripheral pins as inputs. the sleep mode direction register is not reset; the user can maintain the correct direction programmed for each of the peripherals ? pins while in sleep mode. when sleep mode is exited, the table 11-20. ssp control, data, and status register locations address name description 0h 8007 0060 sscr0 ssp control register 0 0h 8007 0064 sscr1 ssp control register 1 0h 8007 0068 ? reserved 0h 8007 006c ssdr ssp data register 0h 8007 0070 ? reserved 0h 8007 0074 sssr ssp status register 0h 8007 0078 ? 0h 8007 ffff ? reserved
11-168 sa-1110 developer ? s manual peripheral control module user can then reprogram the peripherals and the ppc registers to resume control of the peripherals ? pins. to keep the same pin direction and state after sleep mode has been negated but before the user reprograms the peripherals, the system control module ? s power manager maintains the peripherals ? pin direction and state following sleep negation until the peripheral control hold bit (pssr:ph), located in the power manager, is cleared (by writing a one to it). therefore, the pin direction and state established during sleep using the sleep mode direction register remains intact following the negation of sleep until the ph bit is cleared. once ph is cleared, control of the peripherals ? pins is given back to the individual peripherals and to the ppc unit. most of the sa-1110 ? s peripherals can take control of one or more gpio pins (which are normally controlled within the system control module) to act as input or output triggers, or to drive or supply clocks to the peripherals. the gpio unit contains a gpio alternate function register (gafr) that the user must program to give control of the gpio pins to the individual peripheral units for each of the alternate functions. the user must also program the gpio pin direction register (gpdr) for the corresponding pins that are used by the peripheral units. the gpio pin alternate functions are then enabled within the individual peripherals using a control bit. however, two control bits exist within the ppc that configure six of the gpio unit ? s pins for peripheral alternate functions. serial port 1 and serial port 4 both contain two serial-to-parallel engines that operate independently. however, because each port contains only one set of serial pins, the user can assign these pins to only one of the two protocols at a time. to allow the user to utilize both protocols, the ppc can assign one of its two serial-to-parallel engines to the pins that are dedicated to the port, and the other to a set of gpio pins. serial port 1 contains a gpclk and a uart. by setting a bit in the ppc and the appropriate gafr and gpdr bits in the gpio unit, serial port 1 defaults to the gpclk operation, txd1 and rxd1 pins are given to the ppc, and the uart transmits via the gpio 14 pin and receives via the gpio 15 pin. when the sa-1110 is reset or enters sleep mode, the gpio unit ? s registers are reset, which gives control of the gpio pins back to the system control module. 11.13.2 ppc register definitions there are five registers within the ppc: one pin direction register, one pin state register, one pin assignment register, one sleep mode pin direction register, and one pin flag register. 11.13.3 ppc pin direction register pin direction is controlled by programming the ppc pin direction register (ppdr). the ppdr contains individual direction control bits for 22 of the 24 peripheral pins. serial port 0 has dedicated pins (udc+ and udc-) that are not controlled by the ppc when the udc is disabled. each bit is used only if the corresponding peripheral that it controls is disabled. provided the corresponding peripheral is disabled, if the direction bit is programmed to a one, the pin is an output. if it is programmed to a zero, it is an input. following reset, all peripherals are disabled, which causes the ppc to take control of all of their pins. serial ports 1..3 contain individual enables for their transmit and receive serial engines. thus, if only half-duplex transmission is needed, one pin can be used for serial communication and the other for digital i/o communication. note that ppdr is reset such that all the pins are configured as inputs. for reserved bits, writes are ignored and reads return zero. the following table shows the location of each pin direction bit and to which peripheral pin it corresponds.
sa-1110 developer ? s manual 11-169 peripheral control module 0h 9006 0000 ppc pin direction register: ppdr read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved sfrm sclk rxd4 txd4 rxd3 txd3 rxd2 txd2 rxd1 txd1 l_bias l_fclk l_lclk l_pclk ldd 7 ldd 6 ldd 5 ldd 4 ldd 3 ldd 2 ldd 1 ldd 0 reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (sheet 1 of 2) bits name description 7..0 ldd 7..0 lcd data pin direction. 0 ? if lcd controller disabled, lcd data pin configured as general-purpose input. 1 ? if lcd controller disabled, lcd data pin configured as general-purpose output. 8 l_pclk lcd pixel clock pin direction. 0 ? if lcd controller disabled, lcd pixel clock pin configured as general-purpose input. 1 ? if lcd controller disabled, lcd pixel clock pin configured as general-purpose output. 9 l_lclk lcd line clock pin direction. 0 ? if lcd controller disabled, lcd line clock pin configured as general-purpose input. 1 ? if lcd controller disabled, lcd line clock pin configured as general-purpose output. 10 l_fclk lcd frame clock pin direction. 0 ? if lcd controller disabled, lcd frame clock pin configured as general-purpose input. 1 ? if lcd controller disabled, lcd frame clock pin configured as general-purpose output. 11 l_bias lcd ac bias pin direction. 0 ? if lcd controller disabled, lcd ac bias pin configured as general-purpose input. 1 ? if lcd controller disabled, lcd ac bias pin configured as general-purpose output. 12 txd1 serial port 1: uart transmit pin direction. 0 ? if serial port 1 transmitter disabled, transmit pin configured as general-purpose input. 1 ? if serial port 1 transmitter disabled, transmit pin configured as general-purpose output. 13 rxd1 serial port 1: uart receive pin direction. 0 ? if serial port 1 receiver disabled, receive pin configured as general-purpose input. 1 ? if serial port 1 receiver disabled, receive pin configured as general-purpose output. 14 txd2 serial port 2: ipc transmit pin direction. 0 ? if serial port 2 transmitter disabled, transmit pin configured as general-purpose input. 1 ? if serial port 2 transmitter disabled, transmit pin configured as general-purpose output. 15 rxd2 serial port 2: ipc receive pin direction. 0 ? if serial port 2 receiver disabled, receive pin configured as general-purpose input 1 ? if serial port 2 receiver disabled, receive pin configured as general-purpose output. 16 txd3 serial port 3: uart transmit pin direction. 0 ? if serial port 3 transmitter disabled, transmit pin configured as general-purpose input 1 ? if serial port 3 transmitter disabled, transmit pin configured as general-purpose output. 17 rxd3 serial port 3: uart receive pin direction. 0 - if serial port 3 receiver disabled, receive pin configured as general-purpose input. 1 - if serial port 3 receiver disabled, receive pin configured as general-purpose output. 18 txd4 serial port 4: mcp/ssp transmit pin direction. 0 - if serial port 4 disabled, transmit pin configured as general-purpose input. 1 - if serial port 4 disabled, transmit pin configured as general-purpose output. 19 rxd4 serial port 4: mpc/ssp receive pin direction. 0 ? if serial port 4 disabled, receive pin configured as general-purpose input. 1 ? if serial port 4 disabled, receive pin configured as general-purpose output.
11-170 sa-1110 developer ? s manual peripheral control module 11.13.4 ppc pin state register pin state is both monitored and controlled by reading/writing the ppc pin state register (ppsr). the ppsr contains 1 state bit for each of the 22 peripheral pins. this register may be read at any time to determine the current state of all peripheral pins, even when pins are controlled by the peripheral rather than the ppc. if a peripheral is disabled and its corresponding pin direction is programmed as an output in the ppdr, its ppsr bit is used to control the state of the peripheral pin. writing a zero to the pin ? s state bit causes the pin to be forced low, and writing a one causes the pin to be forced high. writing a value to a pin state bit that is an input or is not under the control of the ppc has no effect. to alter the state of an output pin, the user should first read the ppsr, then logically and the value read with a mask, which contains ones in every bit position except the one the user wishes to clear. to set a pin, the user should logically or the value read with a mask, which contains zeros in every bit position except the one the user wishes to set. this mechanism allows the user to set or clear individual pins without changing the state of other pins that are configured as outputs. serial port 2 contains two bits that control the polarity of data input via the receive pin (rxd2) and data output via the transmit pin (txd2). the user must ensure that these polarity bits are set (rxp = txp = 1), which selects true or noninverted data before using txd2 or rxd2 as gpio pins. note that ppsr is implemented as two separate registers. a write to ppsr addresses one of the registers and is used to set and clear pins configured as gpio outputs, while a read addresses the other register that is used to store and monitor pin state. the register used to store pin state contains logic to synchronize the signal input from the pin to allow the user to read it. the pins are sampled at a rate of 7.3728 mhz; each synchronization cycle takes 135.6 ns. depending on the cpu frequency programmed by the user, after changing the state of an output pin via a write, one or more dummy read cycle waitstates may need to be inserted to allow the value to be output to the pin and to allow the synchronizer to resample the pin. the following table shows the location of each pin state bit and to which peripheral pin it corresponds . note that this register is not reset and that for reserved bits, writes are ignored and reads return zero. 20 sclk serial port 4: mpc/ssp serial clock pin direction. 0 ? if serial port 4 disabled, serial clock pin configured as general-purpose input. 1 ? if serial port 4 disabled, serial clock pin configured as general-purpose output. 21 sfrm serial port 4: mpc/ssp serial frame pin direction. 0 ? if serial port 4 disabled, serial frame pin configured as general-purpose input. 1 ? if serial port 4 disabled, serial frame pin configured as general-purpose output. 31..22 ? reserved. 0h 9006 0000 ppc pin direction register: ppdr read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved sfrm sclk rxd4 txd4 rxd3 txd3 rxd2 txd2 rxd1 txd1 l_bias l_fclk l_lclk l_pclk ldd 7 ldd 6 ldd 5 ldd 4 ldd 3 ldd 2 ldd 1 ldd 0 reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (sheet 2 of 2) bits name description
sa-1110 developer ? s manual 11-171 peripheral control module 0h 9006 0004 ppc pin state register: ppsr read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved sfrm sclk rxd4 txd4 rxd3 txd3 rxd2 txd2 rxd1 txd1 l_bias l_fclk l_lclk l_pclk ldd 7 ldd 6 ldd 5 ldd 4 ldd 3 ldd 2 ldd 1 ldd 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (sheet 1 of 2) bits name description 7..0 ldd 7..0 lcd data pin state. read ? current state of lcd data pin returned. write ? if lcd disabled and pin configured as an output, drive value to lcd data pin. 8 l_pclk lcd pixel clock pin state. read ? current state of lcd pixel clock pin returned. write ? if lcd disabled and pin configured as an output, drive value to lcd pixel clock pin. 9 l_lclk lcd line clock pin state. read ? current state of lcd line clock pin returned. write ? if lcd disabled and pin configured as an output, drive value to lcd line clock pin. 10 l_fclk lcd frame clock pin state. read ? current state of lcd frame clock pin returned. write ? if lcd disabled and pin configured as an output, drive value to lcd frame clock pin. 11 l_bias lcd ac bias pin state. read ? current state of lcd ac bias pin returned. write ? if lcd disabled and pin configured as an output, drive value to lcd ac bias pin. 12 txd1 serial port 1: uart transmit pin state. read ? current state of serial port 1 transmit pin returned. write ? if serial port 1 transmitter disabled and pin configured as an output, drive value to transmit pin. 13 rxd1 serial port 1: uart receive pin state. read ? current state of serial port 1 receive pin returned. write ? if serial port 1 receiver disabled and pin configured as an output, drive value to receive pin. 14 txd2 serial port 2: ipc transmit pin state. read ? current state of serial port 1 transmit pin returned. write ? if serial port 2 transmitter disabled and pin configured as an output, drive value to transmit pin. 15 rxd2 serial port 2: ipc receive pin state. read ? current state of serial port 2 receive pin returned. write ? if serial port 2 receiver disabled and pin configured as an output, drive value to receive pin. 16 txd3 serial port 3: uart transmit pin state. read ? current state of serial port 3 transmit pin returned. write ? if serial port 3 transmitter disabled and pin configured as an output, drive value to transmit pin. 17 rxd3 serial port 3: uart receive pin state. read ? current state of serial port 3 receive pin returned. write ? if serial port 3 receive disabled and pin configured as an output, drive value to receive pin 18 txd4 serial port 4: mcp/ssp transmit pin state. read ? current state of serial port 4 transmit pin returned. write ? if serial port 4 transmitter disabled and pin configured as an output, drive value to transmit pin.
11-172 sa-1110 developer ? s manual peripheral control module 11.13.5 ppc pin assignment register the uart in serial port 1 and the ssp in serial port 4 can be reassigned to gpio pins using the ppc pin assignment register (ppar). the ppar contains two bits that control the reassignment of each serial engine to an individual set of gpio pins. 11.13.5.1 uart pin reassignment (upr) the uart pin reassignment (upr) bit selects whether the serial port 1 uart is assigned to gpio pins 14 and 15. when upr=0, serial port 1 uses the txd1 and rxd1 pins; the gpclk/uart select (sus) bit selects which protocol to enable. when upr=1, sus is ignored, serial port 1 defaults to the gpclk operation mode. this configures the uart to use gpio<14> for transmit and gpio<15> for receive. 11.13.5.2 ssp pin reassignment (spr) the ssp pin reassignment (spr) bit is used to select whether serial port 4 ? s ssp is assigned to gpio pins 10 through 13. when spr=0, serial port 4 uses its txd4, rxd4, sclk, and sfrm pins; the mcp enable (mce) and ssp enable (sse) bits are used to select which protocol is enabled (mce has precedence over sse). when spr=1, mce and sse must both be set; serial port 4 defaults to mcp operation using the txd4, rxd4, sclk, and sfrm pins, and the ssp is configured to use gpio 10 for transmit, gpio 11 for receive, gpio 12 for serial clock, and gpio 13 for serial frame. note that the user must set bits 10 through 13 in the gpio alternate function register (gafr) as well as set bits 10, 12, and 13 and clear bit 11 in the gpio pin direction register (gpdr). see the section 9.1, ? general-purpose i/o ? on page 9-1 . the following table shows the location of the two pin reassignment bits. note that for reserved bits, writes are ignored and reads return zero. both control bits are cleared to zero following a reset of the sa-1110, giving control of all gpio pins to the system control module. 19 rxd4 serial port 4: mcp/ssp receive pin state. read ? current state of serial port 4 receive pin returned. write ? if serial port 4 receive disabled and pin configured as an output, drive value to receive pin. 20 sclk serial port 4: mcp/ssp serial clock pin state. read ? current state of serial port 4 serial clock pin returned. write ? if serial port 4 disabled and pin configured as an output, drive value to serial clock pin. 21 sfrm serial port 4: mcp/ssp serial frame pin state. read ? current state of serial port 4 serial frame pin returned. write ? if serial port 4 disabled and pin configured as an output, drive value to serial frame pin. 31..22 ? reserved. 0h 9006 0004 ppc pin state register: ppsr read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved sfrm sclk rxd4 txd4 rxd3 txd3 rxd2 txd2 rxd1 txd1 l_bias l_fclk l_lclk l_pclk ldd 7 ldd 6 ldd 5 ldd 4 ldd 3 ldd 2 ldd 1 ldd 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (sheet 2 of 2) bits name description
sa-1110 developer ? s manual 11-173 peripheral control module 11.13.6 ppc sleep mode pin direction register when sleep mode is entered, reset is asserted to all of the sa-1110 ? s peripherals and to the ppc unit. the ppc pin direction register is cleared during a hard, soft, or sleep reset, causing the peripheral pins under the ppc ? s control to be configured as inputs. if this register were also used to determine pin direction during sleep, the pins would all be configured as inputs. this action would cause any off-chip device that expects data to be output from the sa-1110 to burn power during sleep because its input would float. the sleep mode pin direction register (psdr) prevents this undesired power consumption by allowing the user to establish peripheral pin direction during and immediately following sleep mode. when sleep mode is entered, both the peripherals and the ppc are reset; however, psdr is not reset like ppdr. once the user programs psdr, it retains its data after sleep mode is entered and reset is asserted. the power manager uses the values in psdr to determine the direction and state of the 22 peripheral pins. when a sleep mode direction bit is programmed to a zero, the corresponding pin is configured as an output and is driven low (zero). if it is programmed to a one, it is an input. the power manager latches the contents of psdr before vdd is removed from the sa-1110 to maintain the peripheral pin direction and state after the main power supply is removed. once vdd is removed, the data in psdr is lost and must be reprogrammed after exiting sleep mode. the power manager contains a control bit called the peripheral control hold (pssr:ph). this bit is set upon exit from sleep mode and indicates that the peripheral pins are being held in their sleep state. manager following sleep, the user should first reprogram the peripherals and the ppc, then clear ph (by writing a one to it) in order to give control of the pins back to the peripheral units. note that sleep mode invocation causes rpp to be cleared so that the pins are once again held in their sleep state until the user can set rpp. see chapter 9, ? system control module ? . 0h 9006 0008 ppc pin assignment register: ppar read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved spr reserved upr reserved reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 bits name description 11..0 ? reserved. 12 upr uart pin reassignment. 0 ? no pin reassignment made, gpio 14-15 controlled by gpio unit, serial port 1 uart assigned to txd1 and rxd1 if sus=1. 1 ? pin reassignment made, serial port 1 defaults to gpclk operation (sus ignored), uart transmit assigned to gpio 14 and receive to gpio 15, gafr and gpdr must be configured in gpio unit. 17..13 ? reserved. 18 spr ssp pin reassignment..0 ? no pin reassignment made, gpio 10-13 controlled by gpio unit, serial port 4 ssp assigned to txd4, rxd4, sclk, and sfrm if mce=0 and sse=1. 1 ? pin reassignment made, serial port 4 defaults to mcp operation, ssp transmit assigned to gpio 10, receive to gpio 11, serial clock to gpio 12, and serial frame to gpio 13, gafr and gpdr must be configured in gpio unit. 31..19 ? reserved.
11-174 sa-1110 developer ? s manual peripheral control module because the peripherals are reset when sleep mode is entered, serial port 2 ? s transmit and receive pin (txd2 and rxd2) polarity bits (txp and rxp) are both reset to one, which configures transmit and receive data as true or noninverted data. thus the user need not reprogram these bits prior to the invocation of sleep mode. note that psdr is initialized only by a hardware or power-on reset (negation of the nreset pin). it is not affected by a software reset or a reset that occurs as a result of the sa-1110 entering sleep mode. also note that for reserved bits, writes are ignored and reads return zero. the following table shows the location of each sleep mode pin direction bit and to which peripheral pin it corresponds. 0h 9006 000c ppc pin sleep mode direction register: psdr read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved sfrm sclk rxd4 txd4 rxd3 txd3 rxd2 txd2 rxd1 txd1 l_bias l_fcld l_lclk l_pclk ldd 7 ldd 6 ldd 5 ldd 4 ldd 3 ldd 2 ldd 1 ldd 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 (sheet 1 of 2) bits name description 7..0 ldd 7..0 lcd data sleep mode pin direction. 0 ? lcd data pin configured as output and is driven low during sleep. 1 ? lcd data pin configured as input during sleep. 8l_pclk lcd pixel clock sleep mode pin direction. 0 ? lcd pixel clock pin configured as output and is driven low during sleep. 1 ? lcd pixel clock pin configured as input during sleep. 9 l_lclk lcd line clock sleep mode pin direction. 0 ? lcd line clock pin configured as output and is driven low during sleep. 1 ? lcd line clock pin configured as input during sleep. 10 l_fclk lcd frame clock sleep mode pin direction. 0 ? lcd frame clock pin configured as output and is driven low during sleep. 1 ? lcd frame clock pin configured as input during sleep. 11 l_bias lcd ac bias sleep mode pin direction. 0 ? lcd ac bias pin configured as output and is driven low during sleep. 1 ? lcd ac bias pin configured as input during sleep. 12 txd1 serial port 1: uart transmit sleep mode pin direction. 0 ? transmit pin configured as output and is driven low during sleep. 1 ? transmit pin configured as input during sleep. 13 rxd1 serial port 1: uart receive sleep mode pin direction. 0 ? receive pin configured as output and is driven low during sleep. 1 ? receive pin configured as input during sleep. 14 txd2 serial port 2: ipc transmit sleep mode pin direction. 0 ? transmit pin configured as output and is driven low during sleep. 1 ? transmit pin configured as input during sleep. 15 rxd2 serial port 2: ipc receive sleep mode pin direction. 0 ? receive pin configured as output and is driven low during sleep. 1 ? receive pin configured as input during sleep. 16 txd3 serial port 3: uart transmit sleep mode pin direction. 0 ? transmit pin configured as output and is driven low during sleep. 1 ? transmit pin configured as input during sleep.
sa-1110 developer ? s manual 11-175 peripheral control module 11.13.7 ppc pin flag register the ppc pin flag register (ppfr) is used to determine which peripherals are currently under the control of the ppc unit. the eight read-only flags denote whether or not each of the peripherals (except serial port 0) is enabled or is disabled and being controlled by the ppc. note that serial ports 1..3 contain individual enables for their transmit and receive serial engines. thus, separate flag bits exist for their transmit and receive pins. when a flag is set, it indicates that the corresponding peripheral is disabled and is controlled by the ppc; when it is cleared, it indicates that the peripheral is enabled and its pins are being used for serial transmission (serial ports 1..4) or for lcd operation. note that for reserved bits, writes are ignored and reads return zero. the following table shows the location of each pin flag bit and to which peripheral pin it corresponds. 17 rxd3 serial port 3: uart receive sleep mode pin direction. 0 ? receive pin configured as output and is driven low during sleep. 1 ? receive pin configured as input during sleep. 18 txd4 serial port 4: mcp/ssp transmit sleep mode pin direction. 0 ? transmit pin configured as output and is driven low during sleep. 1 ? transmit pin configured as input during sleep. 19 rxd4 serial port 4: mcp/ssp receive sleep mode pin direction. 0 ? receive pin configured as output and is driven low during sleep. 1 ? receive pin configured as input during sleep. 20 sclk serial port 4: mcp/ssp serial clock sleep mode pin direction. 0 ? serial clock pin configured as output and is driven low during sleep. 1 ? serial clock pin configured as input during sleep. 21 sfrm serial port 4: mcp/ssp serial frame sleep mode pin direction. 0 ? serial frame pin configured as output and is driven low during sleep. 1 ? serial frame pin configured as input during sleep. 31..22 ? reserved. 0h 9006 000c ppc pin sleep mode direction register: psdr read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved sfrm sclk rxd4 txd4 rxd3 txd3 rxd2 txd2 rxd1 txd1 l_bias l_fcld l_lclk l_pclk ldd 7 ldd 6 ldd 5 ldd 4 ldd 3 ldd 2 ldd 1 ldd 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 (sheet 2 of 2) bits name description
11-176 sa-1110 developer ? s manual peripheral control module 0h 9006 0010 ppc pin flag register: ppfr read/write 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved sp4 sp3 rx sp3 tx sp2 rx sp2 tx sp1 rx sp1 tx reserved lcd reset 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 bits name description 0lcd lcd controller flag (read-only). 0 ? lcd controller enabled. 1 ? lcd disabled, ppc currently controlling all 12 of its pins: ldd 7:0, l_pclk, l_lclk, l_fclk, l_bias. 11..1 ? reserved. 12 sp1 tx serial port 1: gpclk/uart transmit flag (read-only). 0 ? gpclk or uart transmit enabled. 1 ? gpclk and uart transmitters disabled, ppc currently controlling the transmit pin: txd1. 13 sp1 rx serial port 1: gpclk/uart receive flag (read-only). 0 ? gpclk or uart receive enabled. 1 ? gpclk and uart receivers disabled, ppc currently controlling the receive pin: rxd1. 14 sp2 tx serial port 2: icp transmit flag (read-only). 0 ? hssp or uart transmit enabled. 1 ? hssp and uart transmitters disabled, ppc currently controlling the transmit pin: txd2. 15 sp2 rx serial port 2: icp receive flag (read-only). 0 ? hssp or uart receive enabled. 1 ? hssp and uart receivers disabled, ppc currently controlling the receive pin: rxd2. 16 sp3 tx serial port 3: uart transmit flag (read-only). 0 ? uart transmit enabled. 1 ? uart transmit disabled, ppc currently controlling the transmit pin: txd3. 17 sp3 rx serial port 3: uart receive flag (read-only). 0 ? uart receive enabled. 1 ? uart receive disabled, ppc currently controlling the receive pin: rxd3. 18 sp4 serial port 4: mcp/ssp flag (read-only). 0 ? mcp or ssp enabled. 1 ? mcp and ssp disabled, ppc currently controlling all 4 of its pins: txd4, rxd4, sclk, sfrm. 31..19 ? reserved.
sa-1110 developer ? s manual 11-177 peripheral control module 11.13.8 ppc register locations table 11-21 shows the registers associated with the ppc and the physical addresses used to access them. note that serial port 2 (icp) has implemented hssp control register 2 and serial port 4 (mcp) has also implemented mcp control register 1 within the ppc ? s address space at 0h 9006 0028 and 0h 9006 0030 respectively. the user should ensure that these registers are not accidentally written by any ppc routines that may attempt to write to all of the ppc ? s address space, including its reserved registers during initialization. table 11-21. ppc control and flag register locations address name description 0h 9006 0000 ppdr ppc pin direction register 0h 9006 0004 ppsr ppc pin state register 0h 9006 0008 ppar ppc pin assignment register 0h 9006 000c psdr ppc sleep mode direction register 0h 9006 0010 ppfr ppc pin flag register 0h 9006 0014 ? 0h 9006 ffff ? reserved

sa-1110 developer ? s manual 12-1 dc parameters 12 this chapter defines the dc parameters for the intel ? strongarm* sa-1110 microprocessor (sa-1110). 12.1 absolute maximum ratings table 12-1 lists the absolute maximum ratings for the sa-1110. * other brands and names are the property of their respective owners. table 12-1. sa-1110 dc maximum ratings symbol parameter min max units note vdd core supply voltage vss ? 0.5 vss + 2.1 v 1 vddx i/o voltage min(vss ? 0.05, vdd ? 0.3) vss + 3.6 v 1 vip voltage applied to any pin vss ? 0.5 vss + 3.6 v 1 vip (*xtal) voltage applied to *xtal pins 0 1 v 1 ts storage temperature ? 40 125 c 1 note: 1. these are stress sa-1110 ratings only. exceeding the absolute maximum ratings may permanently damage the device. operating the device at absolute maximum ratings for extended periods may affect device reliability.
12-2 sa-1110 developer ? s manual dc parameters 12.2 dc operating conditions table 12-2 lists the functional operating dc parameters for the sa-1110. table 12-2. sa-1110 dc operating conditions symbol parameter minimum nomin al maximum units notes vihc ic input high voltage 0.8 vddx ? vddx v 1, 2 vilc ic input low voltage 0.0 ? 0.2 vddx v 1, 2 vohc ocz output high voltage 0.8 vddx ? vddx v 1, 3 volc ocz output low voltage 0.0 ? 0.2 vddx v 1, 3 iohc high-level output current ??? 2ma ? iolc low-level output current ?? 2ma ? ta ambient operating temperature 0 ? 70 c ? iin ic input leakage current ? 10 ? a ? ioh output high current (vout = vdd ? 0.4 v) ? 2 ? ma ? iol output high current (vout = vss + 0.4 v) ? 2 ? ma ? cin input capacitance ? 5 ? pf 4 esd hbm model esd ? 1 ? kv ? notes: 1. voltages measured with respect to vss. 2. ic ? cmos-level inputs (includes ic and icocz pin types). 3. ocz ? output, cmos levels, tristateable. 4. parameter guaranteed by design
sa-1110 developer ? s manual 12-3 dc parameters 12.3 power supply voltages and currents table 2-3 specifies the power supply voltages and currents for the sa-1110. ? room temperature specification. note: only maximum values are guaranteed by manufacturing test screen. table 2-3. sa-1110 power supply voltages and currents parameter sa-1110 units ab bb typical vdd 1.55 1.75 v maximum operating frequency 133 206 mhz maximum run mode power (total vdd + vddx) tbd tbd mw typical run mode power (total vdd + vddx) 240 400 mw maximum idle mode power ? (total vdd + vddx) tbd tbd mw typical idle mode power ? (total vdd + vddx) 75 100 mw maximum sleep mode current ? (total vdd + vddx, with vdd = 0) 65 75 ua typical sleep mode current ? (total vdd + vddx , with vdd = 0) 40 50 ua vdd minimum internal power supply voltage 1.47 1.58 v nominal internal power supply voltage 1.55 1.75 v maximum internal power supply voltage 1.63 1.93 v vddx minimum external power supply voltage 3.00 3.00 v nominal external power supply voltage 3.30 3.30 v maximum external power supply voltage 3.60 3.60 v

sa-1110 developer ? s manual 13-1 ac parameters 13 this chapter defines the ac parameters for the intel ? strongarm * sa-1110 microprocessor (sa-1110). 13.1 test conditions the ac timing diagrams presented in this chapter assume that the outputs of sa-1110 have been loaded with a 50-pf capacitive load on output signals. the output pads of sa-1110 are cmos drivers that exhibit a propagation delay that increases with the increase in load capacitance. table 13-1 lists the output derating figure for the output pad, showing the approximate rate of increase of delay with increasing or decreasing load capacitance for a typical process at room temperature. for derating figures for 1.55-v devices, contact the intel massachusetts customer technology center. note: table 13-1 defines all derating parameters established for the following pins: sdcke[1:0], sdclk[2:0], ncs[3:0], nras/nsdcs[3:0], nsdras, nsdcas, nwe, noe, ncas/dqm[3:0], a[25:10], d[31:0]. table 13-2 defines the derating parameters established for all other pins. note: 1. parameter verified by design note: 1. parameter verified by design * other brands and names are the property of their respective owners. table 13-1. sa-1110 output derating ? fast output buffer output signal load for nominal value output derating (ns/pf) vdd = 1.55 v rising edge output derating (ns/pf) vdd = 1.55 v falling edge output derating (ns/pf) vdd = 1.75 v rising edge output derating (ns/pf) vdd = 1.75 v falling edge note all outputs 50 pf 0.021 0.055 0.019 0.056 1 table 13-2. sa-1110 output derating ? slow output buffer output signal load for nominal value output derating (ns/pf) vdd = 1.55 v rising edge output derating (ns/pf) vdd = 1.55 v falling edge output derating (ns/pf) vdd = 1.75 v rising edge output derating (ns/pf) vdd = 1.75 v falling edge note all outputs 50 pf 0.085 0.077 0.083 0.075 1
13-2 sa-1110 developer ? s manual ac parameters 13.2 model considerations the edge rates for the sa-1110 processor are such that the lumped load model presented above can only be used for etch lengths up to one inch. over one inch of etch, the signal is a transmission line and needs to be modeled as such. 13.3 memory bus and pcmcia signal timings during production test, the sa-1110 is placed in test clock bypass mode by the assertion of the tckbyp pin. this mode (not intended for use by customers) bypasses the 3.686-mhz oscillator and the main pll and sources the processor clock from the testclk pin. during this test mode, all clocks on the sa-1110 are synchronous to testclk. in this mode, the basic functionality of the chip is tested and the pin timings relative to testclk are measured. the ac parameters are measured in this way for each available processor clock speed and supply voltage at which the device is offered. the ac specifications for the sa-1110 memory and pcmcia interfaces are provided relative to the memory clock. in the test clock bypass mode, memory clock is one-half the frequency of testclk. under normal operation, memory clock is one-half the frequency of the processor clock generated by the main pll. even though this clock is not visible to the user, the required pin timing may be inferred through these numbers. input pins are specified by a required setup and hold to the memory clock. outputs are specified by a propagation delay from the edge of the memory clock where the drive starts to the time the pin actually transitions. a 50-pf lumped load is assumed to be on each pin. figure 13-1 shows the memory bus ac timing definitions and table 13-4 describes the ac timing parameters. figure 13-1. memory bus ac timing definitions a4776-01 input hold from memory clock rise input setup to memory clock rise input hold from memory clock fall input setup to memory clock fall memory clock rise to output driven valid memory clock fall to output driven valid memory clock memory bus in (b) memory bus out (a) memory bus out (b) memory bus in (a)
sa-1110 developer ? s manual 13-3 ac parameters 13.4 lcd controller signals figure 13-2 describes the lcd timing parameters. the lcd pin timing specifications are referenced to the pixel clock (l_pclk). 13.5 mcp signals figure 13-3 describes the mcp timing parameters. the mcp pin timing specifications are referenced to sclk_c. figure 13-2. lcd ac timing definitions a4775-01 l_ldd[7:0] (rise) l_ldd[7:0] (fall) l_pclk l_lclk l_bias l_fclk t pclkdv t pclklv t pclkfv t pclkbv t pclkdv figure 13-3. mcp ac timing definitions a4774-01 sclk_c sfrm_c txd_c rxd_c t sfmv t sfmv t rxds t rxdh
13-4 sa-1110 developer ? s manual ac parameters 13.6 timing parameters table 13-3 lists ac timings for sdram and smrom. it includes frequency-dependent guidelines for using the delayed latching option on read data. this option is controlled by the contents of the cas waveform rotate registers (mdcasnn), as described in section 10.2.3.2, ? mdcas registers with sdram and smrom ? on page 10-19 . table 13-4 lists the ac timing guidelines for asynchronous memory types. each parameter references the sa-1110 ? s internal memory clock. these parameters are not guaranteed for use under all operating conditions. table 13-5 lists the ac timing parameters for the sa-1110 mcp interface and lcd controller. for timing parameters for 1.55-v devices, contact the intel massachusetts customer technology center. notes: 1. tsdis and tsdih are specified only for delayed read data latching at the maximum sdclk frequency or non-delayed read data latching at one-half the maximum sdclk frequency. all other tsdis and tsdih values should be considered as guidelines, and are not guaranteed for use under all operating conditions. 2. the larger tsdih values can be achieved by intentionally adding delay to sdclk (e.g.- by using serpentine board routing). however, the system designer must carefully evaluate the resulting degradation to input setup table 13-3. sa-1110 ac timing specifications and guidelines for sdram/smrom pin name symbol parameter ab or bb (133mhz or 206mhz maximum operating frequency) sdclk frequency (mhz) non-delayed or delayed latching on read data min unit note memory bus a<25:0>, d<31:0>, nras/nsdcs<3:0> , ncas/dqm<3:0>, ncs<3:0>, nsdras, nsd- cas, nwe, noe, sdcke<1:0> ts d o s sdram/ smrom output setup time to sdclk<2:0> rise ab 28 - 66 4.2 ns bb 28 - 103 4.2 ns a<25:0>, d<31:0>, nras/nsdcs<3:0> , ncas/dqm<3:0>, ncs<3:0>, nsdras, nsd- cas, nwe, noe, sdcke<1:0> ts d o h sdram/ smrom output hold time from sdclk<2:0> rise ab 28 - 66 2.2 ns bb 28 - 103 2.2 ns d<31:0> ts d i s sdram/ smrom data input setup time to sdclk<2:0> rise ab 28 - 55 non-delayed 11.5 ns 1 55 - 66 delayed 3.4 ns 1 bb 28 - 62 non-delayed 9.3 ns 1 62 - 103 delayed 2.7 ns 1 d<31:0> ts d i h sdram/ smrom data input hold time from sdclk<2:0> rise ab 28 - 55 non-delayed 2.7 ns 1 55 - 62 delayed 4.8 ns 1, 2 62 - 66 delayed 3.9 ns 1, 2 bb 28 - 62 non-delayed 2.7 ns 1 62 - 69 delayed 4.6 ns 1, 2 69 - 77 delayed 3.8 ns 1, 2 77 - 84 delayed 3.2 ns 1, 2 84 - 103 delayed 2.7 ns 1
sa-1110 developer ? s manual 13-5 ac parameters time and output hold time: tsdis and tsdoh will increase and decrease, respectively, from the corresponding table values. notes: 1. these input pins may be sampled on either the rising or falling edge of the memory clock. 2. these signals are pcmcia outputs and are driven by a state machine clocked by bclk. the user defines bclk by programming the number of processor clocks per bclk. two processor clocks make one memory clock cycle. to ensure proper operation, the user must adhere to the protocol description. 3. these signals are pcmcia inputs and are sampled by a state machine clocked by bclk. the user defines bclk by programming the number of processor clocks per bclk. two processor clocks make one memory clock cycle. to ensure proper operation, the user must adhere to the protocol description. 4. these output pins may be driven on either the rising or falling edge of the memory clock. table 13-4. sa-1110 ac timing guidelines for asynchronous memory types pin name symbol parameter min max unit note memory bus d<31:0> tdfov memory clock fall to d<31:0> driven valid ? 10 ns ? tds d<31:0> valid to memory clock rise/fall (input setup) 3 ? ns 1 tdh memory clock rise/fall to data invalid (input hold) 3 ? ns 1 npoe, npwe, npior, npiow, psktsel, npreg, npce<1,2>, a<25:0> tmfov memory clock fall to output driven valid ? 10 ns 2 ? ? ? niois16 tio16s niois16 valid to memory clock rise (input setup) 3 ? ns 3 tio16h memory clock rise to niois16 invalid (input hold) 3 ? ns 3 npwait twaits npwait valid to memory clock fall (input setup) 3 ? ns ? twaith memory clock fall to npwait invalid (input hold) 3 ? ns ? nwe, noe tmrov memory clock rise to output driven valid ? 10 ns ? ? nras/nsdcs<3:0> tmrdv memory clock rise to output driven valid ? 12 ns ? ncas/dqm<3:0> tcasd memory clock rise/fall to ncas/dqm<3:0> driven valid ? 12 ns 4 ncs<5:0> tcsd memory clock rise to ncs<5:0> driven valid ? 10 ns ? rdy trdys rdy valid to memory clock rise/fall (input setup) 3 ? ns ? trdyh memory clock rise/fall to rdy invalid (input hold) 3 ? ns ? rd/nwr trdnwr memory clock rise/fall to rd/nwr driven valid ? 10 ns ? sdclk<2:0> tsdclk memory clock rise to sdclk<2:0> driven valid 2.8 10.8 ns ? table 13-5. sa-1110 ac timing table: mcp interface and lcd controller pin name symbol parameter min max unit note mcp (codec) interface sfrm_c tsfrmv sclk_c rise to sfrm_c driven valid ? 21 ns ? rxd_c trxds rxd_c valid to sclk_c fall (input setup) 0 ? ns ? trxdh sclk_c fall to rxd_c invalid (input hold) 4 ? ns ? txd_c ttxdv sclk_c rise to txd_c valid ? 22 ns ? lcd controller l_ldd<7:0> tpclkdv l_pclk rise/fall to l_ldd<7:0> driven valid ? 14 ns 1
13-6 sa-1110 developer ? s manual ac parameters notes: 1. the lcd data pins can be programmed to be driven on either the rising or falling edge of the pixel clock (l_pclk). 2. these lcd signals can, at times, transition when l_pclk is not clocking (between frames). at this time, they are clocked with the internal version of the pixel clock before it is driven out onto the l_pclk pin. 13.6.1 asynchronous signal timing descriptions the list below describes lists and describes asynchronous timing signals.  npwait is an input and is received through a synchronizer. as such, it has no setup and hold specification. the user must adhere to the protocol definition.  when the peripheral pins are in gpio mode, they are read or written under software control. as outputs, they are driven valid on the pin approximately 20 ns after they are written by software. when inputs, they are received by a synchronizer and must be valid for approximately 20 ns before they are able to be recognized by a cpu read.  nreset must remain asserted for 150 ms after vdd and vddx are stable to properly reset the sa-1110.  nreset_out is asserted for all types of reset (hard, watchdog, sleep, and software) and appears on the pin asynchronously to all clocks.  batt_fault and vdd_fault are asynchronous inputs and are synchronized to the 32.768-khz clock after entering the sa-1110. they must be valid for approximately 60 ms before they are recognized by the sa-1110.  pwr_en asserts when the sa-1110 enters sleep mode and is driven onto the pin following the rising edge of the 32.768-khz clock. it negates on the same edge as sleep mode is exited.  gp 27:0 are read and written under software control. in addition, an asynchronous edge detect may be performed. when writing a value to these pins, the pin transitions approximately 20 ns after the write is performed. when reading these pins, the signal is first synchronized to the internal memory clock and must be valid for at least 20 ns before it is visible to a processor read. for edge detects, the value on the pin following an edge must be stable for at least 10 ns for the edge to be caught by the edge detect circuit.  udc+, udc-, txd_1, rxd_1, txd_2, rxd_2, txd_3, and rxd_3 are asynchronous relative to any device outside the sa-1110. the output pins, like all outputs on the sa-1110, have been characterized while driving a 50-pf lumped load capacitance. l_lclk tpclklv l_pclk fall to l_lclk driven valid ? 14 ns 2 l_fclk tpclkfv l_pclk fall to l_lfclk driven valid ? 14 ns 2 l_bias tpclkbv l_pclk rise to l_bias driven valid ? 14 ns 2 table 13-5. sa-1110 ac timing table: mcp interface and lcd controller (continued) pin name symbol parameter min max unit note
sa-1110 developer ? s manual 14-1 package and pinout 14 this chapter describes the mechanical data and packaging information for the sa-1110. figure 14-1 shows the sa-1110 256-pin mini-bga mechanical drawing. table 14-1 lists the sa-1110 pins in numeric order, showing the signal type for each pin. table 14-2 lists the sa-1110 pins and their corresponding ball grid array (bga) in alphabetic order, showing the signal type for each pin.
14-2 sa-1110 developer ? s manual package and pinout figure 14-1. sa-1110 256-pin mbga mechanical drawing a6843-01
sa-1110 developer ? s manual 14-3 package and pinout note: all vddx1 , vddx2 , and vddx3 pins should be connected directly to the vddx power plane of the system board. vddp should be connected directly to the vdd plane of the system board. table 14-1. sa-1110 pinout ? numeric signal pin list pin signal type bga pad pin signal type bga pad pin signal type bga pad pin signal type bga pad 1rxd_c i/o b1 65 vddx1 d5 129 nsdras o m14 193 rxd_2 i/o b10 2txd_c i/o c2 66 vssx f7 130 nsdcas o l16 194 txd_2 i/o d10 3 vddx2 e12 67 gp 21 i/o t3 131 nras 3 o l15 195 rxd_3 i/o c10 4 vssx a1 68 gp 20 i/o r4 132 nras 2 o l14 196 txd_3 i/o a10 5 vdd c1 69 gp 19 i/o t4 133 nras 1 o l13 197 vssx h9 6 vss d3 70 gp 18 i/o p5 134 nras 0 o k16 198 vddx1 e10 7 d 0 i/o e4 71 gp 17 i/o r5 135 ncas 3 o k13 199 vss a9 8 d 8 i/o d2 72 gp 16 i/o t5 136 ncas 2 o k15 200 txtal i b9 9 d 16 i/o d1 73 gp 15 i/o n6 137 vssx g8 201 textal o c9 10 d 24 i/o e3 74 gp 14 i/o p6 138 vddx2 k5 202 pextal i a8 11 d 1 i/o f4 75 vddx1 d9 139 vss k14 203 pxtal o b8 12 d 9 i/o e2 76 vssx f8 140 vdd j16 204 vddp c8 13 d 17 i/o e1 77 gp 13 i/o r6 141 ncas 1 o j15 205 vss d8 14 d 25 i/o f3 78 gp 12 i/o r7 142 ncas 0 o j14 206 vdd a7 15 vddx2 f12 79 gp 11 i/o t6 143 rd_nwr o j13 207 nreset i b7 16 vssx b2 80 gp 10 i/o p7 144 rdy i h13 208 nreset_out o c7 17 d 2 i/o f2 81 gp 9 i/o t7 145 ncs 5 o h16 209 vddx3 d7 18 d 10 i/o f1 82 gp 8 i/o p8 146 ncs 4 o h15 210 romsel i d6 19 d 18 i/o g4 83 gp 7 i/o n8 147 ncs 3 o h14 211 tck_byp i a6 20 d 26 i/o g3 84 gp 6 i/o r8 148 ncs 2 o g16 212 testclk i b6 21 d 3 i/o g2 85 vddx1 d11 149 vssx g9 213 tms i c6 22 d 11 i/o h6 86 vssx f9 150 vddx2 k12 214 tck i c5 23 d 19 i/o g1 87 vdd t8 151 ncs 1 o g15 215 tdi i a5 24 d 27 i/o h4 88 vss r9 152 ncs 0 o g14 216 tdo o b5 25 vdd h3 89 gp 5 i/o p9 153 a 25 o f16 217 ntrst i b4 26 vss h2 90 gp 4 i/o t9 154 a 24 o g13 218 batt_fault i a4 27 vddx2 g5 91 gp 3 i/o n10 155 a 23 o f13 219 vssx h10 28 vssx c3 92 gp 2 i/o r10 156 a 22 o f15 220 vddx1 e11 29 d 4 i/o h1 93 gp 1 i/o p10 157 a 21 o e16 221 vdd_fault i c4 30 d 12 i/o j6 94 gp 0 i/o t10 158 a 20 o f14 222 pwr_en o a3 31 d 20 i/o j2 95 l_bias i/o r11 159 vssx g10 223 sfrm_c o b3 32 d 28 i/o j3 96 l_pclk i/o p11 160 vddx2 l5 224 sclk_c o a2 33 d 5 i/o j4 97 vddx1 e6 161 a 19 o e15 vddx1 k10 34 d 13 i/o j1 98 vssx f10 162 a 18 o d16 vddx1 k11 35 d 21 i/o k2 99 ldd0 i/o n12 163 a 17 o e14 vddx1 l10 36 d 29 i/o k3 100 ldd1 i/o t11 164 a 16 o d15 vddx1 l11 37 vddx2 g12 101 ldd2 i/o r12 165 a 15 o c16 vddx1 m6 38 vssx d4 102 ldd3 i/o p12 166 a 14 o e13 vddx1 m7 39 d 6 i/o k1 103 ldd4 i/o t12 167 vss d14 vddx1 m8 40 d 14 i/o k4 104 ldd5 i/o r13 168 vdd c15 vddx1 m9 41 d 22 i/o l3 105 ldd6 i/o t13 169 vssx g11 vddx1 m10 42 d 30 i/o l2 106 ldd7 i/o p13 170 vddx2 l12 vddx1 m11 43 d 7 i/o l1 107 vddx1 e7 171 a 13 o d13 vddx1 n7 44 d 15 i/o l4 108 vssx f11 172 a 12 o b16 vddx1 n9 45 d 23 i/o m2 109 l_lclk i/o r14 173 a 11 o c14 vddx1 n11 46 d 31 i/o m1 110 l_fclk i/o t14 174 a 10 o b14 vddx2 f5 47 vddx2 h5 111 npoe o r15 175 a 9 o b15 vddx2 m5 48 vssx e5 112 npwe o t15 176 a 8 o a16 vddx2 m12 49 sdclk 2 o m3 113 npior o t16 177 vssx h7 vddx2 n4 50 sdcke 1 o n2 114 npiow o r16 178 vddx1 e8 vddx2 n5 51 sdclk 1 o n3 115 vssx g6 179 a 7 o a15 vssx h11 52 sdcke 0 o n1 116 vddx2 j5 180 a 6 o a14 vssx j7 53 sdclk 0 o p1 117 vss p14 181 a 5 o b13 vssx j8 54 smrom_en i m4 118 vdd p15 182 a 4 o c13 vssx j9 55 vdd p3 119 psktsl o p16 183 a 3 o a13 vssx j10 56 vss p2 120 nios16 i n13 184 a 2 o b12 vssx j11 57 vddx2 h12 121 npwait i n16 185 a 1 o c12 vssx k6 58 vssx f6 122 npreg o n14 186 a 0 o d12 vssx k7 59 gp 27 i/o r1 123 npce2 o n15 187 vssx h8 vssx k8 60 gp 26 i/o t1 124 npce1 o m16 188 vddx1 e9 vssx k9 61 gp 25 i/o r2 125 nwe o m13 189 udc- i/o a12 vssx l6 62 gp 24 i/o p4 126 noe o m15 190 udc+ i/o c11 vssx l7 63 gp 23 i/o t2 127 vssx g7 191 rxd_1 i/o b11 vssx l8 64 gp 22 i/o r3 128 vddx2 j12 192 txd_1 i/o a11 vssx l9
14-4 sa-1110 developer ? s manual package and pinout note: all vddx1 , vddx2 , and vddx3 pins should be connected directly to the vddx power plane of the system board. vddp should be connected directly to the vdd plane of the system board. table 14-2. sa-1110 pinout ? alphabetic signal pin list bga pad signal type pin bga pad signal type pin bga pad signal type pin bga pad signal type pin a1 vssx 4 e1 d 17 i/o 13 j1 d 13 i/o 34 n1 sdcke 0 o 52 a2 sclk_c o 224 e2 d 9 i/o 12 j2 d 20 i/o 31 n2 sdcke 1 o 50 a3 pwr_en o 222 e3 d 24 i/o 10 j3 d 28 i/o 32 n3 sdclk 1 o 51 a4 batt_fault i 218 e4 d 0 i/o 7 j4 d 5 i/o 33 n4 vddx2 a5 tdi i 215 e5 vssx 48 j5 vddx2 116 n5 vddx2 a6 tck_byp i 211 e6 vddx1 97 j6 d 12 i/o 30 n6 gp 15 i/o 73 a7 vdd 206 e7 vddx1 107 j7 vssx n7 vddx1 a8 pextal o 202 e8 vddx1 178 j8 vssx n8 gp 7 i/o 83 a9 vss 199 e9 vddx1 188 j9 vssx n9 vddx1 a10 txd_3 i/o 196 e10 vddx1 198 j10 vssx n10 gp 3 i/o 91 a11 txd_1 i/o 192 e11 vddx1 220 j11 vssx n11 vddx1 a12 udc- i/o 189 e12 vddx2 3j12 vddx2 128 n12 ldd0 i/o 99 a13 a 3 o 183 e13 a 14 o 166 j13 rd_nwr o 143 n13 niois16 i 120 a14 a 6 o 180 e14 a 17 o 163 j14 ncas 0 o 142 n14 npreg o 122 a15 a 7 o 179 e15 a 19 o 161 j15 ncas 1 o 141 n15 npce2 o 123 a16 a 8 o 176 e16 a 21 o 157 j16 vdd 140 n16 npwait i 121 b1 rxd_c i/o 1 f1 d 10 i/o 18 k1 d 6 i/o 39 p1 sdclk 0 o 53 b2 vssx 16 f2 d 2 i/o 17 k2 d 21 i/o 35 p2 vss 56 b3 sfrm_c o 223 f3 d 25 i/o 14 k3 d 29 i/o 36 p3 vdd 55 b4 ntrst i 217 f4 d 1 i/o 11 k4 d 14 i/o 40 p4 gp 24 i/o 62 b5 tdo o 216 f5 vddx2 k5 vddx2 138 p5 gp 18 i/o 70 b6 testclk i 212 f6 vssx 58 k6 vssx p6 gp 14 i/o 74 b7 nreset i 207 f7 vssx 66 k7 vssx p7 gp 10 i/o 80 b8 pxtal i 203 f8 vssx 76 k8 vssx p8 gp 8 i/o 82 b9 txtal i 200 f9 vssx 86 k9 vssx p9 gp 5 i/o 89 b10 rxd_2 i/o 193 f10 vssx 98 k10 vddx1 p10 gp 1 i/o 93 b11 rxd_1 i/o 191 f11 vssx 108 k11 vddx1 p11 l_pclk i/o 96 b12 a 2 o 184 f12 vddx2 15 k12 vddx2 150 p12 ldd3 i/o 102 b13 a 5 o 181 f13 a 23 o 155 k13 ncas 3 o 135 p13 ldd7 i/o 106 b14 a 10 o 174 f14 a 20 o 158 k14 vss 139 p14 vss 117 b15 a 9 o 175 f15 a 22 o 156 k15 ncas 2 o 136 p15 vdd 118 b16 a 12 o 172 f16 a 25 o 153 k16 nras 0 o 134 p16 psktsel o 119 c1 vdd 5 g1 d 19 i/o 23 l1 d 7 i/o 43 r1 gp 27 i/o 59 c2 txd_c i/o 2 g2 d 3 i/o 21 l2 d 30 i/o 42 r2 gp 25 i/o 61 c3 vssx 28 g3 d 26 i/o 20 l3 d 22 i/o 41 r3 gp 22 i/o 64 c4 vdd_fault i 221 g4 d 18 i/o 19 l4 d 15 i/o 44 r4 gp 20 i/o 68 c5 tck i 214 g5 vddx2 27 l5 vddx2 160 r5 gp 17 i/o 71 c6 tms i 213 g6 vssx 115 l6 vssx r6 gp 13 i/o 77 c7 nreset_out o 208 g7 vssx 127 l7 vssx r7 gp 12 i/o 78 c8 vddp 204 g8 vssx 137 l8 vssx r8 gp 6 i/o 84 c9 textal o 201 g9 vssx 149 l9 vssx r9 vss 88 c10 rxd_3 i/o 195 g10 vssx 159 l10 vddx1 r10 gp 2 i/o 92 c11 udc+ i/o 190 g11 vssx 169 l11 vddx1 r11 l_bias i/o 95 c12 a 1 o 185 g12 vddx2 37 l12 vddx2 170 r12 ldd2 i/o 101 c13 a 4 o 182 g13 a 24 o 154 l13 nras 1 o 133 r13 ldd5 i/o 104 c14 a 11 o 173 g14 ncs 0 o 152 l14 nras 2 o 132 r14 l_lclk i/o 109 c15 vdd 168 g15 ncs 1 o 151 l15 nras 3 o 131 r15 npoe o 111 c16 a 15 o 165 g16 ncs 2 o 148 l16 nsdcas o 130 r16 npiow o 114 d1 d 16 i/o 9 h1 d 4 i/o 29 m1 d 31 i/o 46 t1 gp 26 i/o 60 d2 d 8 i/o 8 h2 vss 26 m2 d 23 i/o 45 t2 gp 23 i/o 63 d3 vss 6h3 vdd 25 m3 sdclk 2 o 49 t3 gp 21 i/o 67 d4 vssx 38 h4 d 27 i/o 24 m4 smrom_en i 54 t4 gp 19 i/o 69 d5 vddx1 65 h5 vddx2 47 m5 vddx2 t5 gp 16 i/o 72 d6 romsel i 210 h6 d 11 i/o 22 m6 vddx1 t6 gp 11 i/o 79 d7 vddx3 209 h7 vssx 177 m7 vddx1 t7 gp 9 i/o 81 d8 vss 205 h8 vssx 187 m8 vddx1 t8 vdd 87 d9 vddx1 75 h9 vssx 197 m9 vddx1 t9 gp 4 i/o 90 d10 txd_2 i/o 194 h10 vssx 219 m10 vddx1 t10 gp 0 i/o 94 d11 vddx1 85 h11 vssx m11 vddx1 t11 ldd1 i/o 100 d12 a 0 o 186 h12 vddx2 57 m12 vddx2 t12 ldd4 i/o 103 d13 a 13 o 171 h13 rdy i 144 m13 nwe o 125 t13 ldd6 i/o 105 d14 vss 167 h14 ncs 3 o 147 m14 nsdras o 129 t14 l_fclk i/o 110 d15 a 16 o 164 h15 ncs 4 o 146 m15 noe o 126 t15 npwe o 112 d16 a 18 o 162 h16 ncs 5 o 145 m16 npce1 o 124 t16 npior o 113
sa-1110 developer ? s manual 15-1 debug support 15 due to the integration level of the intel ? strongarm * sa-1110 microprocessor (sa-1110), many functions are not directly visible on the external pins. therefore, some basic debug facilities are provided that are not present on the intel ? strongarm sa-110 microprocessor (sa-110). these facilities are in the form of breakpoints that provide the user with the ability to stop execution after seeing a specific reference in either the instruction or data streams. execution then proceeds to an exception routine during which the user may examine the internal state of the machine. the instruction and data breakpoint facilities are described in this chapter. the breakpoints are enabled through additions to coprocessor 15. 15.1 instruction breakpoint the instruction breakpoint allows the user to stop the processor execution after the execution of an instruction at a selected address. this address is programmed into the instruction breakpoint address and control register (ibcr). this register is 32 bits wide and contains the address value for the breakpoint, and a bit to enable the breakpoint. bit 0 is the enable bit. when set, this bit enables the breakpoint and when cleared, it disables the breakpoint. bit 1 is reserved and has no effect when written. bits 31..2 are compared against the fetch address to qualify the breakpoint. when the breakpoint is enabled, the sa-1110 executes until the instruction at this address is fetched and the fetch address equals the program counter (ignoring bits 0 and 1 of the address). at this point, the processor takes a prefetch abort exception. the interrupt routine must examine r14 (the saved program counter) to determine if the exception was caused by the breakpoint. the ibcr is loaded by way of coprocessor 15, register 14. access to this register is privileged. see the section 5.1, ? internal coprocessor instructions ? on page 5-1 for details on the format of the instruction used to access the ibcr. 15.2 data breakpoint the data breakpoint allows the user to stop the processor execution after a load or store operation to a particular address. the data breakpoint address is programmed into the data breakpoint address register (dbar) and is a full 32-bit value (to permit breakpoints on byte accesses). for stores, the breakpoint condition may also be programmed to include a particular data pattern as well as the reference address. the data value is programmed by way of the data breakpoint value register (dbvr) and the data breakpoint mask register (dbmr). the dbvr is a 32-bit register containing the value against which the store data is compared. the data value can be further qualified through the data breakpoint mask register (dbmr). the dbmr is a 32-bit register containing mask information indicating which bits in the store data should be compared against the dbmr. a 1 in a particular bit position in the dbmr indicates that bit in the dbvr should be compared against the store data to qualify the breakpoint. to cause a breakpoint on a store data value, the address breakpoint must also be enabled, otherwise, no breakpoint will occur. breakpoints on loads are permitted only through an address match. breakpoints on load address, store address, and store data are enabled and disabled through the data breakpoint control register (dbcr). a single bit is defined for each action. when a breakpoint is taken, the processor takes a data abort exception and sets bit 9 in the fault status register (fsr). the dbar, dbvr, and dbmr are loaded by way of coprocessor 15, register 14. access to this register is privileged. * other brands and names are the property of their respective owners.

sa-1110 developer ? s manual 16-1 boundary-scan test interface 16 the boundary-scan interface conforms to the ieee std. 1149.1 ? 1990, standard test access port and boundary-scan architecture. (refer to this standard for an explanation of the terms used in this section and for a description of the tap controller states.) the intel ? strongarm * sa-1110 microprocessor (sa-1110) supports only jtag continuity testing. 16.1 overview the boundary-scan interface provides a means of driving and sampling all the external pins of the device irrespective of the core state. this function permits testing of both the device ? s electrical connections to the circuit board and (in conjunction with other devices on the circuit board having a similar interface) testing the integrity of the circuit board connections between devices. the interface intercepts all external connections within the device, and each such ? cell ? is then connected together to form a serial shift register (the boundary-scan register). the whole interface is controlled via five dedicated pins: tdi, tms, tck, ntrst, and tdo. figure 16-1 shows the state transitions that occur in the tap controller. note that all sa-1110 signals participate in the boundary scan. however, in the case of the pwr_en pin, the contents of the scan latches are not placed on the pin. this is to prevent a scan operation from turning off power to the sa-1110. figure 16-1. test access port (tap) controller state transitions select-ir-scan capture-ir tms=0 shift-ir tms=0 exit1-ir tms=1 pause-ir tms=0 exit2-ir tms=1 update-ir tms=1 tms=0 tms=0 tms=1 tms=1 tms=0 select-dr-scan capture-dr tms=0 shift-dr tms=0 exit1-dr tms=1 pause-dr tms=0 exit2-dr tms=1 update-dr tms=1 test-logic reset run-test/idle tms=0 tms=1 tms=0 tms=0 tms=0 tms=1 tms=1 tms=0 tms=1 tms=1 tms=1 tms=1 tms=1 tms=0 tms=0 * other brands and names are the property of their respective owners.
16-2 sa-1110 developer ? s manual boundary-scan test interface 16.2 reset the boundary-scan interface includes a state-machine controller (the tap controller). in order to force the tap controller into the correct state after power-up of the device, a reset pulse must be applied to the ntrst pin. if the boundary-scan interface is to be used, then ntrst must be driven low, and then high again. if the boundary-scan interface is not to be used, then the ntrst pin may be tied permanently low. note that a clock on tck is not necessary to reset the device. the action of reset (either a pulse or a dc level) is as follows:  system mode is selected (the boundary-scan chain does not intercept any of the signals passing between the pads and the core).  idcode mode is selected. if tck is pulsed, the contents of the id register will be clocked out of tdo. 16.3 pull-up resistors the ieee 1149.1 standard effectively requires that tdi, ntrst, and tms should have internal pull-up resistors. to minimize static current draw, ntrst has an internal pull-down resistor. these pins can be left unconnected for normal operation and overdriven to use the jtag features. 16.4 instruction register the instruction register is 5 bits in length. there is no parity bit. the fixed value loaded into the instruction register during the capture-ir controller state is: 00001. 16.5 public instructions the following public instructions are supported: instruction binary code extest 00000 sample/preload 00001 clamp 00100 highz 00101 idcode 00110 bypass 11111 private 00010, 00011, 00111, 01000-01111, 10000-11110 in the descriptions that follow, tdi and tms are sampled on the rising edge of tck, and all output transitions on tdo occur as a result of the falling edge of tck.
sa-1110 developer ? s manual 16-3 boundary-scan test interface 16.5.1 extest (00000) the boundary-scan (bs) register is placed in test mode by the extest instruction. the extest instruction connects the bs register between tdi and tdo. when the instruction register is loaded with the extest instruction, all the boundary-scan cells are placed in their test mode of operation. in the capture-dr state, inputs from the system pins and outputs from the boundary-scan output cells to the system pins are captured by the boundary-scan cells. in the shift-dr state, the previously captured test data is shifted out of the bs register via the tdo pin, while new test data is shifted in via the tdi pin to the bs register parallel input latch. in the update-dr state, the new test data is transferred into the bs register parallel output latch. note that this data is applied immediately to the system logic and system pins. 16.5.2 sample/preload (00001) the bs register is placed in normal (system) mode by the sample/preload instruction. the sample/preload instruction connects the bs register between tdi and tdo. when the instruction register is loaded with the sample/preload instruction, all the boundary-scan cells are placed in their normal system mode of operation. in the capture-dr state, a snapshot of the signals at the boundary-scan cells is taken on the rising edge of tck. normal system operation is unaffected. in the shift-dr state, the sampled test data is shifted out of the bs register via the tdo pin, while new data is shifted in via the tdi pin to preload the bs register parallel input latch. in the update-dr state, the preloaded data is transferred into the bs register parallel output latch. note that this data is not applied to the system logic or system pins while the sample/preload instruction is active. this instruction should be used to preload the boundary-scan register with known data prior to selecting extest instructions. 16.5.3 clamp (00100) the clamp instruction connects a 1-bit shift register (the bypass register) between tdi and tdo. when the clamp instruction is loaded into the instruction register, the state of all output signals is defined by the values previously loaded into the boundary-scan register. a guarding pattern (specified for this device at the end of this section) should be preloaded into the boundary-scan register using the sample/preload instruction prior to selecting the clamp instruction. in the capture-dr state, a logic 0 is captured by the bypass register. in the shift-dr state, test data is shifted into the bypass register via tdi and out via tdo after a delay of one tck cycle. note that the first bit shifted out will be a zero. the bypass register is not affected in the update-dr state.
16-4 sa-1110 developer ? s manual boundary-scan test interface 16.5.4 highz (00101) the highz instruction connects a 1-bit shift register (the bypass register) between tdi and tdo. when the highz instruction is loaded into the instruction register, all outputs are placed in an inactive drive state. in the capture-dr state, a logic 0 is captured by the bypass register. in the shift-dr state, test data is shifted into the bypass register via tdi and out via tdo after a delay of one tck cycle. note that the first bit shifted out will be a zero. the bypass register is not affected in the update-dr state. 16.5.5 idcode (00110) the idcode instruction connects the device identification register (or id register) between tdi and tdo. the id register is a 32-bit register that allows the manufacturer, part number and version of a component to be determined through the tap. when the instruction register is loaded with the idcode instruction, all the boundary-scan cells are placed in their normal (system) mode of operation. in the capture-dr state, the device identification code (specified at the end of this section) is captured by the id register. in the shift-dr state, the previously captured device identification code is shifted out of the id register via the tdo pin, while data is shifted in via the tdi pin into the id register. in the update-dr state, the id register is unaffected. 16.5.6 bypass (11111) the bypass instruction connects a 1-bit shift register (the bypass register) between tdi and tdo. when the bypass instruction is loaded into the instruction register, all the boundary-scan cells are placed in their normal (system) mode of operation. this instruction has no effect on the system pins. in the capture-dr state, a logic 0 is captured by the bypass register. in the shift-dr state, test data is shifted into the bypass register via tdi and out via tdo after a delay of one tck cycle. note that the first bit shifted out will be a zero. the bypass register is not affected in the update-dr state.
sa-1110 developer ? s manual 16-5 boundary-scan test interface 16.6 test data registers figure 16-2 illustrates the structure of the boundary-scan logic. figure 16-2. boundary-scan block diagram 16.6.1 bypass register purpose: this is a single-bit register that can be selected as the path between tdi and tdo to allow the device to be bypassed during boundary-scan testing. length: 1 bit operating mode: when the bypass instruction is the current instruction in the instruction register, serial data is transferred from tdi to tdo in the shift-dr state with a delay of one tck cycle. there is no parallel output from the bypass register. a logic 0 is loaded from the parallel input of the bypass register in the capture-dr state. a6831-01 * strongarm is a registered trademark of arm limited. bsincell bsoutcell bsoutcell bsinencell bsincell bsoutnencell i/o cell intel ? strongarm ? sa-1110 device id register bypass register instruction decoder tdo tdi tms tck ntrst instruction register ntdoen core logic ta p controller
16-6 sa-1110 developer ? s manual boundary-scan test interface 16.6.2 intel ? strongarm sa-1110 device identification (id) code register this register is used to read the 32-bit device identification code. no programmable supplementary identification code is provided. when the idcode instruction is current, this register is selected as the serial path between tdi and tdo. the 32-bit device identification code is loaded into the register from its parallel inputs during the capture-dr state.. 16.6.3 intel ? strongarm sa-1110 boundary-scan (bs) register purpose: the bs register consists of a serially connected set of cells around the periphery of the device, at the interface between the core logic and the system input/output pads. this register can be used to isolate the pins from the core logic and then drive or monitor the system pins. operating modes: the bs register is selected as the register to be connected between tdi and tdo only during the sample/preload and extest instructions. values in the bs register are used, but are not changed, during the clamp instruction. in the normal (system) mode of operation, straight-through connections between the core logic and pins are maintained, and normal system operation is unaffected. in test mode (when extest is the currently selected instruction), values can be applied to the output pins independently of the actual values on the input pins and core logic outputs. on the sa-1110, all of the boundary-scan cells include update registers; thus, all of the pins can be controlled in the above manner. an additional boundary-scan cell is interposed in the scan chain to control the enabling of the data bus. table 16-2 shows the correspondence between boundary-scan cells and system pins, system direction controls, and system output enables. the cells are listed in the order in which they are connected in the boundary-scan register, starting with the cell closest to tdi. sa-1110 device identification (id) code register read-only 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 stepping part number manufacturer id constant stepping stepping revision of the sa-1110 0000 = a0 stepping 0100 = b0 stepping 0101 = b1 stepping 0110 = b2 stepping part number part number 1001001001100001 = SA1110 manufacturer id manufacturer id 00000001001 = intel corporation constant 1
sa-1110 developer ? s manual 16-7 boundary-scan test interface the extest guard values should be clocked into the boundary-scan register (using the sample/preload instruction) before the extest instruction is selected, to ensure that known data is applied to the core logic during the test. these guard values should also be used when new extest vectors are clocked into the boundary-scan register. the values stored in the bs register after power-up are not defined. similarly, the values previously clocked into the bs register are not guaranteed to be maintained across a boundary-scan reset (from forcing ntrst low or entering the test logic reset state). figure 16-3 , figure 16-4 , and figure 16-5 show the typical timing for the bs register. 16.7 boundary-scan interface signals figure 16-3. boundary-scan general timing a4772-01 tck data in data out tdo tms, tdi tbscl tbsch tbsis tbsih tbsoh tbsod tbsss tbssh tbsdh tbsdd
16-8 sa-1110 developer ? s manual boundary-scan test interface figure 16-4. boundary-scan tristate timing figure 16-5. boundary-scan reset timing a4773-01 tck data out tdo tbsoe tbsoz tbsde tbsdz a4771-01 ntrst tms tbsrs tbsr tbsrh
sa-1110 developer ? s manual 16-9 boundary-scan test interface table 16-1 shows the sa-1110 boundary-scan interface timing specifications. table 16-1. sa-1110 boundary-scan interface timing symbol parameter minimum typical maximum units notes tbscl tck low period 50 ?? ns 8 tbsch tck high period 50 ?? ns 8 tbsis tdi , tms setup to tcr 10 ?? ns ? tbsih tdi , tms hold from tcr 10 ?? ns ? tbsoh tdo hold time 5 ?? ns 1 tbsod tcf to tdo valid ?? 40 ns 1 tbsss i/o signal setup to tcr 5 ?? ns 4 tbssh i/o signal hold from tcr 20 ?? ns 4 tbsdh data output hold time 5 ?? ns 5 tbsdd tcf to data output valid ?? 40 ns ? tbsoe tdo enable time 5 ?? ns 1,2 tbsoz tdo disable time ?? 40 ns 1,3 tbsde data output enable time 5 ?? ns 5,6 tbsdz data output disable time ?? 40 ns 5,7 tbsr reset period 30 ?? ns ? tbsrs tms setup to trr 10 ?? ns 8 tbsrh tms hold from trr 10 ?? ns 8 notes: 1. assumes a 25-pf load on tdo. output timing derates at 0.072 ns/pf of extra load applied. 2. tdo enable time applies when the tap controller enters the shift-dr or shift-ir states. 3. tdo disable time applies when the tap controller leaves the shift-dr or shift-ir states. 4. for correct data latching, the i/o signals (from the core and the pads) must be set up and held with respect to the rising edge of tck in the capture-dr state of the sample/preload and extest instructions. 5. assumes that the data outputs are loaded with the ac test loads. 6. data output enable time applies when the boundary-scan logic is used to enable the output drivers. 7. data output disable time applies when the boundary scan is used to disable the output drivers. 8. tck may be stopped indefinitely in either the low or high phase.
16-10 sa-1110 developer ? s manual boundary-scan test interface table 16-2 shows the sa-1110 correspondence between boundary-scan cells and system pins, system direction controls and system output enables. key to table : in input pad out output pad en enable oel output enable latch oel ? output enable latch for nwe, noe, nsdras, nsdcas, nras 0, ncas 3:0, a 25:0 icl input capture latch ocl output capture latch vdcl voltage differential capture latch table 16-2. boundary-scan signals and pins (sheet 1 of 4) no. pin type bs cell bs function guard value ex no. pin type bs cell bs function guard value ex from tdi 1 batt_fault in qjti icl 35 d 10 in qjti icl 2 vdd_fault in qjti icl 36 d 18 out qjto ocl 3 pwr_en out qjtogp ocl 37 d 18 in qjti icl 4 sfrm_c en qjtena oel 38 d 26 out qjto ocl 5 sfrm_c out qjto ocl 39 d 26 in qjti icl 6 sfrm_c in qjti icl 40 d 3 out qjto ocl 7 sclk_c en qjtena oel 41 d 3 in qjti icl 8 sclk_c out qjto ocl 42 d 11 out qjto ocl 9 sclk_c in qjti icl 43 d 11 in qjti icl 10 rxd_c en qjtena oel 44 d 19 out qjto ocl 11 rxd_c out qjto ocl 45 d 19 in qjti icl 12 rxd_c in qjti icl 46 d 27 out qjto ocl 13 txd_c en qjtena oel 46 d 27 in qjti icl 14 txd_c out qjto ocl 48 d 4 out qjto ocl 15 txd_c in qjti icl 49 d 4 in qjti icl 16 d 0 out qjto ocl 50 d 12 out qjto ocl 17 d 0 in qjti icl 51 d 12 in qjti icl 18 d 8 out qjto ocl 52 d 20 out qjto ocl 19 d 8 in qjti icl 53 d 20 in qjti icl 20 d 16 out qjto ocl 54 d 28 out qjto ocl 21 d 16 in qjti icl 55 d 28 in qjti icl 22 d 24 out qjto ocl 56 d 5 out qjto ocl 23 d 24 in qjti icl 57 d 5 in qjti icl 24 d 1 out qjto ocl 58 d 13 out qjto ocl 25 d 1 in qjti icl 59 d 13 in qjti icl 26 d 9 out qjto ocl 60 d 21 out qjto ocl 27 d 9 in qjti icl 61 d 21 in qjti icl 28 d 17 out qjto ocl 62 d 29 out qjto ocl 29 d 17 in qjti icl 63 d 29 in qjti icl 30 d 25 out qjto ocl 64 d 6 out qjto ocl 31 d 25 in qjti icl 65 d 6 in qjti icl 32 d 2 out qjto ocl 66 d 14 out qjto ocl 33 d 2 in qjti icl 67 d 14 in qjti icl 34 d 10 out qjto ocl 68 d 22 out qjto ocl
sa-1110 developer ? s manual 16-11 boundary-scan test interface 69 d 22 in qjti icl 122 gp 16 out qjtogp ocl 70 d 30 out qjto ocl 123 gp 16 in qjti icl 71 d 30 in qjti icl 124 gp 15 en qjtenap oel 72 d 7 out qjto ocl 125 gp 15 out qjtogp ocl 73 d 7 in qjti icl 126 gp 15 in qjti icl 74 d 15 out qjto ocl 127 gp 14 en qjtenap oel 75 d 15 in qjti icl 128 gp 14 out qjtogp ocl 76 d 23 out qjto ocl 129 gp 14 in qjti icl 77 d 23 in qjti icl 130 gp 13 en qjtenap oel 78 d 31 out qjto ocl 131 gp 13 out qjtogp ocl 79 d 31 in qjti icl 132 gp 13 in qjti icl 80 d 31:0 en qjtena oel 133 gp 12 en qjtenap oel 81 sdclk 2 out qjto d 31:0 oel 134 gp 12 out qjtogp ocl 82 sdcke 1 out qjto ocl 135 gp 12 in qjti icl 83 sdclk 1 en qjto oel 136 gp 11 en qjtenap oel 84 sdcke 1 out qjto ocl 137 gp 11 out qjtogp ocl 85 sdclk 0 out qjto ocl 138 gp 11 in qjti icl 86 sdcke 0 out qjto ocl 139 gp 10 en qjtenap oel 87 smrom_en in qjti icl 140 gp 10 out qjtogp ocl 88 gp 27 en qjtenap oel 141 gp 10 in qjti icl 89 gp 27 out qjtogp ocl 142 gp 9 en qjtenap oel 90 gp 27 in qjti icl 143 gp 9 out qjtogp ocl 91 gp 26 en qjtenap oel 144 gp 9 in qjti icl 92 gp 26 out qjtogp ocl 145 gp 8 en qjtenap oel 93 gp 26 in qjti icl 146 gp 8 out qjtogp ocl 94 gp 25 en qjtenap oel 147 gp 8 in qjti icl 95 gp 25 out qjtogp ocl 148 gp 7 en qjtenap oel 96 gp 25 in qjti icl 149 gp 7 out qjtogp ocl 97 gp 24 en qjtenap oel 150 gp 7 in qjti icl 98 gp 24 out qjtogp ocl 151 gp 6 en qjtenap oel 99 gp 24 in qjti icl 152 gp 6 out qjtogp ocl 100 gp 23 en qjtenap oel 153 gp 6 in qjti icl 101 gp 23 out qjtogp ocl 154 gp 5 en qjtenap oel 102 gp 23 in qjti icl 155 gp 5 out qjtogp ocl 103 gp 22 en qjtenap oel 156 gp 5 in qjti icl 104 gp 22 out qjtogp ocl 157 gp 4 en qjtenap oel 105 gp 22 in qjti icl 158 gp 4 out qjtogp ocl 106 gp 21 en qjtenap oel 159 gp 4 in qjti icl 107 gp 21 out qjtogp ocl 160 gp 3 en qjtenap oel 108 gp 21 in qjti icl 161 gp 3 out qjtogp ocl 109 gp 20 en qjtenap oel 162 gp 3 in qjti icl 110 gp 20 out qjtogp ocl 163 gp 2 en qjtenap oel 111 gp 20 in qjti icl 164 gp 2 out qjtogp ocl 112 gp 19 en qjtenap oel 165 gp 2 in qjti icl 113 gp 19 out qjtogp ocl 166 gp 1 en qjtenap oel 114 gp 19 in qjti icl 167 gp 1 out qjtogp ocl 115 gp 18 en qjtenap oel 168 gp 1 in qjti icl 116 gp 18 out qjtogp ocl 169 gp 0 en qjtenap oel 117 gp 18 in qjti icl 170 gp 0 out qjtogp ocl 118 gp 17 en qjtenap oel 171 gp 0 in qjti icl 119 gp 17 out qjtogp ocl 172 l_bias en qjtena oel 120 gp 17 in qjti icl 173 l_bias out qjto ocl 121 gp 16 en qjtenap oel 174 l_bias in qjti icl table 16-2. boundary-scan signals and pins (sheet 2 of 4) no. pin type bs cell bs function guard value ex no. pin type bs cell bs function guard value ex
16-12 sa-1110 developer ? s manual boundary-scan test interface 175 l_pclk en qjtena oel 228 ncas 2 out qjto ocl 176 l_pclk out qjto ocl 229 ncas 1 out qjto ocl 177 l_pclk in qjti icl 230 ncas 0 out qjto ocl 178 l_dd 0 en qjtena oel 231 rd/nwr out qjto ocl 179 l_dd 0 out qjto ocl 232 rdy in qjti icl 180 l_dd 0 in qjti icl 233 ncs 5 out qjto ocl 181 l_dd 1 en qjtena oel 234 ncs 4 out qjto ocl 182 l_dd 1 out qjto ocl 235 ncs 3 out qjto ocl 183 l_dd 1 in qjti icl 236 ncs 2 out qjto ocl 184 l_dd 2 en qjtena oel 237 ncs 1 out qjto ocl 185 l_dd 2 out qjto ocl 238 ncs 0 out qjto ocl 186 l_dd 2 in qjti icl 239 a 25 out qjto_fast ocl 187 l_dd 3 en qjtena oel 240 a 24 out qjto_fast ocl 188 l_dd 3 out qjto ocl 241 a 23 out qjto_fast icl 189 l_dd 3 in qjti icl 242 a 22 out qjto_fast ocl 190 l_dd 4 en qjtena oel 243 a 21 out qjto_fast ocl 191 l_dd 4 out qjto ocl 244 a 20 out qjto_fast ocl 192 l_dd 4 in qjti icl 245 a 19 out qjto_fast ocl 193 l_dd 5 en qjtena oel 246 a 18 out qjto_fast ocl 194 l_dd 5 out qjto ocl 247 a 17 out qjto_fast ocl 195 l_dd 5 in qjti icl 248 a 16 out qjto_fast ocl 196 l_dd 6 en qjtena oel 249 a 15 out qjto_fast ocl 197 l_dd 6 out qjto ocl 250 a 14 out qjto_fast icl 198 l_dd 6 in qjti icl 251 a 13 out qjto_fast ocl 199 l_dd 7 en qjtena oel 252 a 12 out qjto_fast ocl 200 l_dd 7 out qjto ocl 253 a 11 out qjto_fast ocl 201 l_dd 7 in qjti icl 254 a 10 out qjto_fast ocl 202 l_lclk en qjtena oel 255 a 9 out qjto ocl 203 l_lclk out qjto ocl 256 a 8 out qjto ocl 204 l_lclk in qjti icl 257 a 7 out qjto ocl 205 l_fclk en qjtena oel 258 a 6 out qjto ocl 206 l_fclk out qjto ocl 259 a 5 out qjto icl 207 l_fclk in qjti icl 260 a 4 out qjto ocl 208 npoe out qjto ocl 261 a 3 out qjto ocl 209 npwe out qjto ocl 262 a 2 out qjto ocl 210 npior out qjto ocl 263 a 1 out qjto ocl 211 npiow out qjto ocl 264 a 0 out qjto ocl 212 psktsel out qjto ocl 265 udc- en qjtena oel 213 niois16 in qjti icl 266 udc- out qjto ocl 214 npwait in qjti icl 267 udc- in qjti icl 215 npreg out qjto ocl 268 udc-/udc+ in qjti udc-/udc+ vdcl 216 npce 2 out qjto ocl 269 udc+ en qjtena oel 217 npce 1 out qjto ocl 270 udc+ out qjto ocl 218 ? en qjtena oel ? 271 udc+ in qjti icl 219 nwe out qjto ocl 272 rxd_1 en qjtena oel 220 noe out qjto ocl 273 rxd_1 out qjto ocl 221 nsdras out qjto ocl 274 rxd_1 in qjti icl 222 nsdcas out qjto ocl 275 txd_1 en qjtena oel 223 nras 3 out qjto ocl 276 txd_1 out qjto ocl 224 nras 2 out qjto ocl 277 txd_1 in qjti icl 225 nras 1 out qjto ocl 278 rxd_2 en qjtena oel 226 nras 0 out qjto ocl 279 rxd_2 out qjto ocl 227 ncas 3 out qjto ocl 280 rxd_2 in qjti icl table 16-2. boundary-scan signals and pins (sheet 3 of 4) no. pin type bs cell bs function guard value ex no. pin type bs cell bs function guard value ex
sa-1110 developer ? s manual 16-13 boundary-scan test interface notes: 1. the boundary scan (bs) numbers are listed in order from the first bs latch after the tdi input pin. thus, for a given bs pattern, the first bit input will land in the 292nd bs latch and the last bit will land in the first bs latch. 2. bs latch 80 controls the tristate enable of the d 31:0 pins. a ? 1 ? in latch 80 will tristate the d 31:0 pins. 3. bs latch 83 controls the tristate enable for output pin sdclk 1. a ? 1 ? in latch 83 will tristate sdclk 1. 4. bs latch 218 controls the tristate enable of nwe, noe, nsdras, nsdcas, nras 0, ncas 3:0, and a 25:0. a ? 1 ? in latch 218 will tristate these pins. 5. the output enable latches for udc- and udc+, 265 and 269, will tristate the outputs when a ? 1 ? is latched in. 6. for all other output or in/out pins, a ? 0 ? in the output enable latch will tristate the output in. 281 txd_2 en qjtena oel 287 txd_3 en qjtena oel 282 txd_2 out qjto ocl 288 txd_3 out qjto ocl 283 txd_2 in qjti icl 289 txd_3 in qjti icl 284 rxd_3 en qjtena oel 290 nreset in qjti icl 285 rxd_3 out qjto ocl 291 nreset_out out qjto ocl 286 rxd_3 in qjti icl 292 rom_sel in qjti icl to tdo table 16-2. boundary-scan signals and pins (sheet 4 of 4) no. pin type bs cell bs function guard value ex no. pin type bs cell bs function guard value ex

sa-1110 developer?s manual a-1 register summary a this appendix describes all of the intel ? strongarm * sa-1110 microprocessor (sa-1110) internal registers. physical address symbol register name udc registers (serial port 0) 0h 8000 0000 udccr udc control register. 0h 8000 0004 udcar udc address register. 0h 8000 0008 udcomp udc out max packet register. 0h 8000 000c udcimp udc in max packet register. 0h 8000 0010 udccs0 udc endpoint 0 control/status register. 0h 8000 0014 udccs1 udc endpoint 1 (out) control/status register. 0h 8000 0018 udccs2 udc endpoint 2 (in) control/status register. 0h 8000 001c udcd0 udc endpoint 0 data register. 0h 8000 0020 udcwc udc endpoint 0 write count register. 0h 8000 0024 ? reserved. 0h 8000 0028 udcdr udc transmit/receive data register (fifos). 0h 8000 002c ? reserved. 0h 8000 0030 udcsr udc status/interrupt register. uart registers (serial port 1) 0h 8001 0000 utcr0 uart control register 0. 0h 8001 0004 utcr1 uart control register 1. 0h 8003 0008 utcr2 uart control register 2. 0h 8001 000c utcr3 uart control register 3. 0h 8001 0010 ? reserved. 0h 8001 0014 utdr uart data register. 0h 8001 0018 ? reserved. 0h 8001 001c utsr0 uart status register 0. 0h 8001 0020 utsr1 uart status register 1. 0h 8001 0024 ? 0h 8001 ffff ? reserved. gpclk registers (serial port 1) 0h 8002 0060 gpclkr0 gpclk control register 0. 0h 8002 0064 ? gpclk control register 1. 0h 8002 0068 ? reserved. 0h 8002 006c gpclkr1 gpclk control register 2. 0h 8002 0070 gpclkr2 gpclk control register 3. 0h 8002 0074 ? reserved.
a-2 sa-1110 developer ? s manual register summary 0h 8002 0078 ? reserved. 0h 8002 007c ? reserved. 0h 8002 0080 ? reserved. 0h 8002 0084 ? reserved. 0h 8002 0088 ? 0h 8002 ffff ? reserved. icp ? uart registers (serial port 2) 0h 8003 0000 utcr0 uart control register 0. 0h 8003 0004 utcr1 uart control register 1. 0h 8003 0008 utcr2 uart control register 2. 0h 8003 000c utcr3 uart control register 3. 0h 8003 0010 utcr4 uart control register 4. 0h 8003 0014 utdr uart data register. 0h 8003 0018 ? reserved. 0h 8003 001c utsr0 uart status register 0. 0h 8003 0020 utsr1 uart status register 1. 0h 8003 0024 ? 0h 8003 ffff ? reserved. icp ? hssp registers (serial port 2) 0h 8004 0060 hscr0 hssp control register 0. 0h 8004 0064 hscr1 hssp control register 1. 0h 8004 0068 ? reserved. 0h 8004 006c hsdr hssp data register. 0h 8004 0070 ? reserved. 0h 8004 0074 hssr0 hssp status register 0. 0h 8004 0078 hssr1 hssp status register 1. 0h 8004 007c ? 0h 8004 ffff ? reserved. uart registers (serial port 3) 0h 8005 0000 utcr0 uart control register 0. 0h 8005 0004 utcr1 uart control register 1. 0h 8005 0008 utcr2 uart control register 2. 0h 8005 000c utcr3 uart control register 3. 0h 8005 0010 ? reserved. 0h 8005 0014 utdr uart data register. 0h 8005 0018 ? reserved. 0h 8005 001c utsr0 uart status register 0. 0h 8005 0020 utsr1 uart status register 1. 0h 8005 0024 ? 0h 8005 ffff ? reserved. mcp registers (serial port 4) 0h 8006 0000 mccr0 mcp control register 0. 0h 8006 0004 ? reserved. physical address symbol register name
sa-1110 developer ? s manual a-3 register summary 0h 8006 0008 mcdr0 mcp data register 0. 0h 8006 000c mcdr1 mcp data register 1. 0h 8006 0010 mcdr2 mcp data register 2. 0h 8006 0014 ? reserved. 0h 8006 0018 mcsr mcp status register. 0h 8006 001c ? 0h 8006 005c ? reserved. ssp registers (serial port 4) 0h 8007 0060 sscr0 ssp control register 0. 0h 8007 0064 sscr1 ssp control register 1. 0h 8007 0068 ? reserved. 0h 8007 006c ssdr ssp data register. 0h 8007 0070 ? reserved. 0h 8007 0074 sssr ssp status register. 0h 8007 0078 ? 0h 8007 ffff ? reserved. os timer registers 0h 9000 0000 osmr 0 os timer match registers 3:0 . 0h 9000 0004 osmr 1 0h 9000 0008 osmr 2 0h 9000 000c osmr 3 0h 9000 0010 oscr os timer counter register. 0h 9000 0014 ossr os timer status register. 0h 9000 0018 ower os timer watchdog enable register. 0h 9000 001c oier os timer interrupt enable register. real-time clock registers 0h 9001 0000 rtar real-time clock alarm register. 0h 9001 0004 rcnr real-time clock count register. 0h 9001 0008 rttr real-time clock trim register. 0h 9001 0010 rtsr real-time clock status register. power manager registers 0h 9002 0000 pmcr power manager control register. 0h 9002 0004 pssr power manager sleep status register. 0h 9002 0008 pspr power manager scratchpad register. 0h 9002 000c pwer power manager wakeup enable register. 0h 9002 0010 pcfr power manager configuration register. 0h 9002 0014 ppcr power manager pll configuration register. 0h 9002 0018 pgsr power manager gpio sleep state register. 0h 9002 001c posr power manager oscillator status register. reset controller registers 0h 9003 0000 rsrr reset controller software reset register. physical address symbol register name
a-4 sa-1110 developer ? s manual register summary 0h 9003 0004 rcsr reset controller status register. 0h 9003 0008 tucr reserved for test. gpio registers 0h 9004 0000 gplr gpio pin level register. 0h 9004 0004 gpdr gpio pin direction register. 0h 9004 0008 gpsr gpio pin output set register. 0h 9004 000c gpcr gpio pin output clear register. 0h 9004 0010 grer gpio rising-edge register. 0h 9004 0014 gfer gpio falling-edge register. 0h 9004 0018 gedr gpio edge detect status register. 0h 9004 001c gafr gpio alternate function register. interrupt controller registers 0h 9005 0000 icip interrupt controller irq pending register. 0h 9005 0004 icmr interrupt controller mask register. 0h 9005 0008 iclr interrupt controller fiq level register. 0h 9005 000c iccr interrupt controller control register. 0h 9005 0010 icfp interrupt controller fiq pending register. 0h 9005 0020 icpr interrupt controller pending register. ppc registers 0h 9006 0000 ppdr ppc pin direction register. 0h 9006 0004 ppsr ppc pin state register. 0h 9006 0008 ppar ppc pin assignment register. 0h 9006 000c psdr ppc sleep mode direction register. 0h 9006 0010 ppfr ppc pin flag register. 0h 9006 0028 hscr2 hssp control register 2. 0h 9006 0030 mccr1 mcp control register 1. memory controller registers 0x a000 0000 mdcnfg dram configuration register. 0x a000 0004 mdcas00 dram cas waveform rotate register 0 for dram bank pair 0/1. 0x a000 0008 mdcas01 dram cas waveform rotate register 1 for dram bank pair 0/1. 0x a000 000c mdcas02 dram cas waveform rotate register 2 for dram bank pair 0/1. 0x a000 0010 msc0 static memory control register 0. 0x a000 0014 msc1 static memory control register 1. 0x a000 0018 mecr expansion bus configuration register. 0x a000 001c mdrefr dram refresh control register. 0x a000 0020 mdcas20 dram cas waveform rotate register 0 for dram bank pair 2/3. physical address symbol register name
sa-1110 developer ? s manual a-5 register summary 0x a000 0024 mdcas21 dram cas waveform rotate register 1 for dram bank pair 2/3. 0x a000 0028 mdcas22 dram cas waveform rotate register 2 for dram bank pair 2/3. 0x a000 002c msc2 static memory control register 2. 0x a000 0030 smcnfg smrom configuration register. dma controller registers 0h b000 0000 ddar0 dma device address register. 0h b000 0004 dcsr0 dma control/status register 0 ? write ones to set. 0h b000 0008 write ones to clear. 0h b000 000c read only. 0h b000 0010 dbsa0 dma buffer a start address 0. 0h b000 0014 dbta0 dma buffer a transfer count 0. 0h b000 0018 dbsb0 dma buffer b start address 0. 0h b000 001c dbtb0 dma buffer b transfer count 0. 0h b000 0020 ddar1 dma device address register 1. 0h b000 0024 dcsr1 dma control/status register 1 ? write ones to set. 0h b000 0028 write ones to clear. 0h b000 002c read only. 0h b000 0030 dbsa1 dma buffer a start address 1. 0h b000 0034 dbta1 dma buffer a transfer count 1. 0h b000 0038 dbsb1 dma buffer b start address 1. 0h b000 003c dbtb1 dma buffer b transfer count 1. 0h b000 0040 ddar2 dma device address register 2. 0h b000 0044 dcsr2 dma control/status register 2 ? write ones to set. 0h b000 0048 write ones to clear. 0h b000 004c read only. 0h b000 0050 dbsa2 dma buffer a start address 2. 0h b000 0054 dbta2 dma buffer a transfer count 2. 0h b000 0058 dbsb2 dma buffer b start address 2. 0h b000 005c dbtb2 dma buffer b transfer count 2. 0h b000 0060 ddar3 dma device address register 3. 0h b000 0064 dcsr3 dma control/status register 3 ? write ones to set. 0h b000 0068 write ones to clear. 0h b000 006c read only. 0h b000 0070 dbsa3 dma buffer a start address 3. 0h b000 0074 dbta3 dma buffer a transfer count 3. 0h b000 0078 dbsb3 dma buffer b start address 3. 0h b000 007c dbtb3 dma buffer b transfer count 3. physical address symbol register name
a-6 sa-1110 developer ? s manual register summary * other brands and names are the property of their respective owners. 0h b000 0080 ddar4 dma device address register 4. 0h b000 0084 dcsr4 dma control/status register 4 ? write ones to set. 0h b000 0088 write ones to clear. 0h b000 008c read only. 0h b000 0090 dbsa4 dma buffer a start address 4. 0h b000 0094 dbta4 dma buffer a transfer count 4. 0h b000 0098 dbsb4 dma buffer b start address 4. 0h b000 009c dbtb4 dma buffer b transfer count 4. 0h b000 00a0 ddar5 dma device address register 5. 0h b000 00a4 dcsr5 dma control/status register 5 ? write ones to set. 0h b000 00a8 write ones to clear. 0h b000 00ac read only. 0h b000 00b0 dbsa5 dma buffer a start address 5. 0h b000 00b4 dbta5 dma buffer a transfer count 5. 0h b000 00b8 dbsb5 dma buffer b start address 5. 0h b000 00bc dbtb5 dma buffer b transfer count 5. lcd controller registers 0h b010 0000 lccr0 lcd controller control register 0. 0h b010 0004 lcsr lcd controller status register. 0h b010 0008 ? 0hb010 000c ? reserved. 0h b010 0010 dbar1 dma channel 1 base address register. 0h b010 0014 dcar1 dma channel 1 current address register. 0h b010 0018 dbar2 dma channel 2 base address register. 0h b010 001c dcar2 dma channel 2 current address register. 0h b010 0020 lccr1 lcd controller control register 1. 0h b010 0024 lccr2 lcd controller control register 2. 0h b010 0028 lccr3 lcd controller control register 3. 0h b010 002c ? 0h b010 ffff ? reserved. physical address symbol register name
sa-1110 developer ? s manual b-1 3.6864?mhz oscillator specifications b a 3.6864-mhz crystal oscillator is integrated on the intel ? strongarm * sa-1110 microprocessor (sa-1110) for use as a reference frequency for the plls that generate the internal clocks to the processor. the phase noise of this reference frequency should be minimized because it could be amplified by the plls, resulting in pll output frequency jitter. for this application, the long-term stability and the temperature effect on the frequency are not important because they affect the frequency by less than 1%. the oscillator circuit is designed to work across a range of crystal parameters so that the system designer can choose from several 3.6864-mhz crystals available on the market. in normal operation, the pins of the crystal, q1 and q2, are connected to the sa-1110 pins, pxtal and pextal. note that a 3.5795-mhz crystal can also be used, but in order to meet the frequency specifications of several of the integrated i/o ports, a 3.6864-mhz crystal is required. in some applications, it may be desirable to provide the 3.6864-mhz reference from an external signal source. this option is supported by the sa-1110. see chapter 8, ? clocks ? . b.1 specifications this section includes specifications for the oscillator circuit and the quartz crystal. b.1.1 system specifications this section includes the specifications of the oscillator circuit. it assumes that the crystal used meets the specifications given in the following sections. temperature range this is the junction temperature range for the oscillator circuit on the sa-1110. the crystal itself may be at the ambient temperature; the oscillator circuit integrated on the sa-1110 is most likely operating at a higher temperature that is dependent on the activity of the sa-1110. current consumption because this oscillator might run during the sleep mode of the processor, the power consumption is critical. the specified current consumption is for the oscillator only. the power associated with the oscillator output buffer is not included because this buffer is powered down in sleep. startup time this specification depends on the crystal characteristics and the layout of the printed circuit board (pcb). the value given assumes that the crystal and board layout conform to the values given in the remainder of this document. the critical parameters in the crystal specification are the shunt capacitance (co) and the motional resistance (rm), which must be no greater than the maximums specified. the critical parameters in the pcb layout are the parasitic capacitances between pxtal and pextal, and between either of these nodes and vss. * other brands and names are the property of their respective owners.
b-2 sa-1110 developer ? s manual 3.6864?mhz oscillator specifications note that in some applications, such as a system that includes a socketed sa-1110, it may be difficult to meet the parasitic capacitances specified. while the 3.6864-mhz oscillator will start with parasitic capacitances, which are approximately twice the values given, the startup time in this situation will be about double the specified startup time and the current consumption will increase. capacitances larger than twice the specified values may prevent the oscillator from starting. b.1.1.1 parasitic capacitance off-chip between pxtal and pextal the parasitic capacitance off-chip between pxtal and pextal is the board capacitance between the pxtal and pextal pins. b.1.1.2 parasitic capacitance off-chip between pxtal or pextal and vss the parasitic capacitance off-chip between pxtal or pextal and vss is the parasitic board capacitance between the pxtal or pextal pins and the vss wire surrounding the crystal connections. b.1.1.3 parasitic resistance between pxtal and pextal the parasitic resistance between pxtal and pextal is the parasitic resistance between the pxtal and pextal pins due to moisture and other effects. b.1.1.4 parasitic resistance between pxtal or pextal and vss the parasitic resistance between pxtal or pextal and vss is the parasitic resistance between the pxtal or pextal pins to vss due to moisture and other effects. the following table describes the system specifications of the oscillator circuit. specification minimum typical maximum unit temperature range 0 100 o c supply voltage 3 3.3 3.6 v ripple voltage on the supply ?? 0.3 v current consumption ? 15 40 a startup time ? 15 150 ms parasitic capacitance off-chip between pxtal and pextal ?? 1 pf parasitic capacitance off-chip between pxtal or pextal and vss ? ? 2 pf parasitic resistance between pxtal or pextal to vss 1 ?? m ? parasitic resistance between pxtal and pextal 1 ?? m ?
sa-1110 developer ? s manual b-3 3.6864 ? mhz oscillator specifications b.1.2 quartz crystal specification the following specifications for the quartz crystal are shown in the figure and table below. resonance frequency ( fs ): resonance frequency of the crystal. motional capacitance ( cm ): equivalent serial capacitance in the crystal model. motional inductance ( lm ): not generally given in supplier specification. motional resistance ( rm ): equivalent serial resistance in the crystal model. some crystal providers refer to this resistance as the equivalent series resistance (esr) or simply series resistance. shunt capacitance ( co ): parasitic capacitance between q1 and q2. load capacitance ( cl ): needed load capacitance viewed by the crystal to oscillate at fs. drive level : power dissipated in the equivalent serial resistance (rm). aging : resonance frequency shift due to aging. specification minimum typical maximum unit resonance frequency (fs) 3.5795 3.6864 ? mhz motional resistance (rm) 40 180 300 w shunt capacitance (co) ?? 7pf drive level ?? 10 w crystal type at cut crystal q1 q2 cm lm rm co

sa-1110 developer ? s manual c-1 32.768 ? khz oscillator specifications c a 32.768-khz crystal oscillator is integrated on the intel ? strongarm * sa-1110 microprocessor (sa-1110) for use as a time base for the real-time clock (rtc). the output frequency of the crystal oscillator is divided by 32768 (2 15 ) to deliver a 1-hz signal to the rtc. a digital tuning circuit is included on the sa-1110 in order to calibrate the 1-hz output for each crystal and circuit based on a set of values stored in an external eeprom. the oscillator circuit is designed to work across a range of crystal parameters so that the system designer can choose from several 32.768-khz crystals available on the market. in normal operation, the pins of the crystal, q1 and q2, are connected to the sa-1110 pins, txtal and textal. in some applications, it may be desirable to provide the 32.768-khz reference from an external signal source. this option is supported by the sa-1110. see the chapter 8, ? clocks ? . c.1 specifications this section includes specifications for the oscillator circuit and the quartz crystal. c.1.1 system specifications this section includes the specifications of the oscillator circuit. it assumes that the crystal used meets the specifications given in the following sections. c.1.1.1 temperature range this is the junction temperature range for the oscillator circuit on the sa-1110. the crystal itself may be at the ambient temperature; the oscillator circuit integrated on the sa-1110 is most likely operating at a higher temperature that is dependent on the activity of the sa-1110. c.1.1.2 current consumption because this oscillator runs during the sleep mode of the processor, the power consumption is critical. the specified current consumption is for the oscillator and its output buffer only. the power of the tuning circuit and rtc is not included in the value specified. c.1.1.3 startup time this specification depends on the crystal characteristics and the layout of the printed circuit board (pcb). the value given assumes that the crystal and board layout conform to the values given in the remainder of this document. the critical parameters in the crystal specification are the shunt capacitance (co) and the motional resistance (rm), which must be no greater than the maximums specified. the critical parameters in the pcb layout are the parasitic capacitances between txtal and textal, and between either of these nodes and vss. note that in some applications, such as a system that includes a socketed sa-1110, it may be difficult to meet the parasitic capacitances specified. * other brands and names are the property of their respective owners.
c-2 sa-1110 developer ? s manual 32.768 ? khz oscillator specifications while the 32.768-khz oscillator will start with parasitic capacitances which are approximately twice the values given; the startup time in this situation will be about double the specified startup time and the current consumption will increase. capacitances larger than twice the specified values may prevent the oscillator from starting. c.1.1.4 frequency shift due to temperature effect on the circuit the frequency shift due to temperature effect on the circuit is the influence of the oscillator circuit on the frequency of oscillation due to temperature effect. the appropriate temperature range is the junction temperature on the sa-1110, not the ambient temperature. note that this specification does not include either the temperature effects on the quartz or the aging of the crystal. it includes the temperature effect of the circuit only. the frequency shift of the crystal itself due to temperature may be significantly larger than that of the oscillator circuit. however, for a long-term stability calculation, it may be appropriate to consider the average temperature of the crystal rather than the extreme values of temperature. c.1.1.5 parasitic capacitance off-chip between txtal and textal the parasitic capacitance off-chip between txtal and textal is the board capacitance between the txtal and textal pins. c.1.1.6 parasitic capacitance off-chip between txtal or textal and vss the parasitic capacitance off-chip between txtal or textal and vss is the parasitic board capacitance between the txtal or textal pins and the vss wire surrounding the crystal connections. c.1.1.7 parasitic resistance between txtal and textal the parasitic resistance between txtal and textal is the parasitic resistance between the txtal and textal pins due to moisture and other effects. c.1.1.8 parasitic resistance between txtal or textal and vss the parasitic resistance between txtal or textal and vss is the parasitic resistance between the txtal or textal pins to vss due to moisture and other effects. the following table describes the specifications of the oscillator circuit. specification minimum typical maximum unit temperature range 0 100 o c supply voltage 3 3.3 3.6 v ripple voltage on the supply ?? 0.3 v current consumption ? 12a startup time ?? 2s frequency shift due to temperature effect on the circuit ?? +/-3 ppm parasitic capacitance off-chip between txtal and textal ?? 1pf
sa-1110 developer ? s manual c-3 32.768 ? khz oscillator specifications c.1.2 quartz crystal specification the following specifications for the quartz crystal are shown in the figure and table below. parasitic capacitance off-chip between txtal or textal and vss ?? 2pf parasitic resistance between txtal or textal to vss 10 ?? m ? parasitic resistance between txtal and textal 10 ?? m ? resonance frequency (fs): resonance frequency of the crystal. motional capacitance (cm): equivalent serial capacitance in the crystal model. motional inductance (lm): not generally given in supplier specification. motional resistance (rm): equivalent serial resistance in the crystal model. some crystal providers refer to this resistance as the equivalent series resistance (esr) or simply series resistance. other providers supply a quality factor, q, instead of rm; therefore, the values for q corresponding to specified range of rm are supplied in the following table. shunt capacitance (co): parasitic capacitance between q1 and q2. load capacitance (cl): needed load capacitance viewed by the crystal to oscillate at fs. drive level: power dissipated in the equivalent serial resistance (rm). aging: resonance frequency shift due to aging. q1 q2 cm lm rm co
c-4 sa-1110 developer ? s manual 32.768 ? khz oscillator specifications the following values are not required for the crystal oscillator to function, but they directly affect the performance of the oscillator in the system because they determine the accuracy of the crystal itself. the values given represent those seen on typical crystals used for time keeping, and are provided for information only. specification minimum typical maximum unit resonance frequency (fs) ? 32768 ? hz quality factor (q) 40k 80k 200k ? motional capacitance (cm) 234ff motional resistance (rm) ?? 50k w shunt capacitance (co) 0.9 ? 2pf load capacitance (cl) 10 12.5 25 pf drive level ?? 1 w crystal type tuning fork (x+5 o or x+2 o cut) specification minimum typical maximum unit frequency tolerance +/-5 +/-20 +/-30 ppm parabolic curvature ? -0.042 -0.05 ppm/ o c turnover temperature 20 25 30 o c temperature range 0 ? 60 o c aging ? +/-3 +/-5 ppm/year
d- 1 sa-11 1 0 d e v e l o p e r ? s m a n ual internal test internal test d the test unit contains a register that enables certain test modes. some of these test modes are reserved for manufacturing test and should not be invoked by an end-user. d.1 test unit control register (tucr) the test unit control register (tucr) contains control bits that put the intel ? strongarm * sa-1110 microprocessor (sa-1110) in various test modes. it is recommended that the operating system write protect these registers under normal conditions to prevent them from being inadvertently written. the following figure shows the format of this register. at reset reserved bits are zero. writing reserved bits to one can lead to unpredictable results. * other brands and names are the property of their respective owners. test unit control register: tucr 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 tsel2 tsel1 tsel0 reserved mr pmd reserved 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 bits name description 8..0 ? reserved. 9pmd power management disable. when pmd is set, sleep mode is disabled and the sa-1110 ignores the forcesleep bit, as well as the batt_fault and vdd_fault pins. this bit is cleared on hard reset. 10 mr memory request mode. controls two gpio pins used for external arbitration and for the memory bus. 0 ? gp 21 and gp 22 are not used for an alternate function. 1 ? gp 21 and gp 22 are reserved for use as mbgnt and mbreq, respectively. 28..11 ? reserved. 31..29 tsel2..0 test selects. routes internal signals out onto gpio 27 for observing internal clock signals. to observe these clocks, set bit 27 to one in the gafr and gpdr registers and set the tsel bits to the following settings to select which clock is driven onto gp 27: tsel2 0 0 0 0 1 1 1 1 tsel1 0 0 1 1 0 0 1 1 tsel0 0 1 0 1 0 1 0 1 gp 27(alternate function) 32-khz oscillator 3.6864-mhz oscillator vdd ring oscillator/16 96-mhz pll/4 32-khz oscillator (also enable rclk on gp 26) 3.6864-mhz oscillator main pll/16 vddl ring oscillator/4




▲Up To Search▲   

 
Price & Availability of SA1110

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X